while (scanner.hasNextInt())
           sum += number;