import java.io.*; import java.math.BigInteger; public class prob13 { public static void main(String args[]) { String s; BigInteger sum = new BigInteger("0"); BigInteger newval; try { FileInputStream fstream = new FileInputStream("prob13data.txt"); DataInputStream in = new DataInputStream(fstream); while (in.available() != 0) { s = in.readLine(); newval = new BigInteger(s); sum = sum.add(newval); } in.close(); } catch (Exception e) { System.err.println("Error"); } s = sum.toString(); System.out.println(s.substring(0,10)); } }