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