import java.util.*; import java.math.BigInteger; /** * UVa Problem 424 Integer Inquiry * Accepted JAVA 0.180secs 2012-10-11 22:27:30 */ class Main { Scanner scan = new Scanner (System.in); public static void main(String args[]) { Main app = new Main(); app.run(); } void run() { BigInteger sum = BigInteger.ZERO; // process each input case while (scan.hasNext()) { String input = scan.nextLine(); // Compute the sum sum = sum.add(new BigInteger(input)); } System.out.println(sum.toString()); } }