import java.util.*;
import java.math.*;
public class Main
{
public static void main(String args[])
{
Scanner cin=new Scanner(System.in);
BigInteger sum=BigInteger.valueOf(0);
while(cin.hasNext())
{
BigInteger a=cin.nextBigInteger();
if(a.equals(BigInteger.ZERO))
{
break;
}
sum=sum.add(a);
}
System.out.println(sum);
}
}