Very sad. Won't leave loop.
package com.codegym.task.task05.task0507;
import java.io.*;
/*
Arithmetic mean
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String x1 = reader.readLine();
double mean = 0;
int sum = 0;
int i = 0;
int x = Integer.valueOf(x1);
while(x != -1){
sum = sum + x;
i++;
}
mean = sum/i;
System.out.println(mean);
//write your code here
}
}