Что не так?
package com.javarush.task.task04.task0442;
/*
Суммирование
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader x = new BufferedReader(new InputStreamReader(System.in));
while (true) {
int a = Integer.parseInt(x.readLine());
int b = Integer.parseInt(x.readLine());
int c = Integer.parseInt(x.readLine());
int d = Integer.parseInt(x.readLine());
int e = Integer.parseInt(x.readLine());
if(a == -1 || b == -1 || c == -1 || d == -1 || e == -1){
System.out.println(a + b + c + d + e);}
break;
}
}
}