// Reads and prints the sum of numbers read in from the file "numbers.text". A trailer value of -1 is used to 
// determine when to stop reading numbers.

import java.io.*;
import java.util.*;

public class Summer {
	public static void main(String [] args) throws Exception {
		Scanner scanner = new Scanner(new File("numbers.text"));

		int total = 0;

		int num = scanner.nextInt();
		while (num != -1) {
			total += num;
			num = scanner.nextInt();
		}

		System.out.println("The sum of the numbers read in is: " + total);
	}
}
