I cant get the new entered numbers to be added to the existing sum which obviously is 0 at the start. Hope to get some help here. thanks guys.
public class Solution {
    public static void main(String[] args) throws Exception {
        //schreib hier deinen Code

    int x = 0;
    int y = 0;

    while (true){

    BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    String s = reader.readLine();
    int x = Integer.parseInt(s);

    if (x == -1);

    else (y= y+x);