#include<iostream>
#include<stdio.h>
#include<string.h>
using namespace std;
int main()
{
int cou;
int count = 0;
cin >> cou;
char s[210], s1[210];
double ave = 0, num, num1;
for (int i = 0; i < cou; i++)
{
num = 1001;
scanf("%s", s);
sscanf(s, "%lf", &num);
sprintf(s1, "%.2lf", num);
for (int j = 0; j < strlen(s); j++)
{
if (s[j] != s1[j])
num = 1001;
}
if (num >= -1000 && num <= 1000)
{
count++;
ave += num;
}
else
cout << "ERROR: " << s << " is not a legal number\n";
}
if (count == 0)
cout << "The average of 0 numbers is Undefined\n";
else if(count>1)
{
cout << "The average of " << count << " numbers is ";
printf("%.2f\n", ave / count);
}
else
{
cout << "The average of 1 number is ";
printf("%.2f\n", ave / count);
}
system("pause");
return 0;
}