import java.io.*;publicclassMain{publicstaticvoidmain(String[] args)throws IOException {BufferedReader br =newBufferedReader(newInputStreamReader(System.in));PrintWriter out =newPrintWriter(newOutputStreamWriter(System.out));int n = Integer.parseInt(br.readLine());String[] real = br.readLine().split(" ");// 實(shí)數(shù)double sum =0;// 合法實(shí)數(shù)的和int k =0;// 合法實(shí)數(shù)的個(gè)數(shù)for(int i =0; i < n;++i){try{double x = Double.parseDouble(real[i]);// 解析成double型不合法拋異常int width =0;// 小數(shù)部分位數(shù)if(real[i].contains(".")){// 是小數(shù)width = real[i].length()- real[i].indexOf('.')-1;// 小數(shù)位數(shù)}if(x <-1000|| x >1000|| width >2){// 超范圍或小數(shù)部分過(guò)長(zhǎng)thrownewNumberFormatException();}sum += x;++k;}catch(NumberFormatException e){// 處理異常,輸出信息System.out.println("ERROR: "+ real[i]+" is not a legal number");}}if(k==0){// 無(wú)合法實(shí)數(shù)System.out.println("The average of 0 numbers is Undefined");}elseif(k==1){// 只有1個(gè)合法實(shí)數(shù)System.out.printf("The average of 1 number is %.2f", sum);// 單數(shù)無(wú)s字符}else{// 多個(gè)合法實(shí)數(shù)System.out.printf("The average of %d numbers is %.2f", k, sum / k);}}}