public class Solution {
    public static void main(String[] args) throws Exception {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        int a,sum;
        String s;
        s=reader.readLine();
        //a=Integer.parseInt(s);
        sum=0;
        while (s!="сумма") {
            a = Integer.parseInt(s);
            sum =sum+ a;
            s = reader.readLine();
        }

        System.out.println(sum);
    }


}