В идее выдает ошибку, не знаю почему.
Scanner scn = new Scanner(System.in);
        int summ = 0;
        for (int i = 1; i > 0; i++){
            String s = scn.nextLine();
            if (s.equals("сумма")){
                System.out.println(summ);
            }
            else{
                int number = scn.nextInt();
                summ +=number;

            }
        }