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