public class Solution {
    public static void main(String[] args) throws Exception {
        Scanner scanner = new Scanner(System.in);
        int sum = 0;
        do {
            String end = scanner.nextLine();
            if (end.equals("сумма")) {
                break;
            }
            else {
                int a = Integer.valueOf(end);
                sum += a;
            }
        } while (true);
                System.out.println(sum);
    }
}