import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); //write your code here...... int sum=0; int count=0; double avg=0.0; while(scan.hasNext()) { int n=scan.nextInt(); if(n<0) { break; } count++; sum+=n; } avg=(double)sum/count; System.out.println(String.format("%.2f",avg)); } }