//Java版代码
import java.util.Scanner;
import java.math.BigInteger;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        BigInteger sum = BigInteger.ZERO;
        BigInteger a;
        do {
            a = sc.nextBigInteger();
            sum = sum.add(a);
        } while (!a.equals(BigInteger.ZERO));
        System.out.println(sum);
    }
}
#Python版代码
a = int(input())
sum = a
while a:
    a = int(input())
    sum += a
print(sum)