import java.io.File;
import java.util.Scanner;

public class Scanning {
    public static void main(String[] args) {
	
	int sum = 0;
	Scanner sc = null;
	
	try {
	    sc = new Scanner(new File("integers.txt"));
	}
	catch(Exception e) {
	    System.exit(0);
	}
	
	while(sc.hasNextInt())    // Check to see that there is a valid integer next
	    sum += sc.nextInt(); // Parse the next token as an integer
	
	sc.close(); // Close the scanner
	System.out.println("The sum is: " + sum);
	
    }
}
