uses crt;
var i,n,dem:integer;
a:array[1..100]of real;
begin
clrscr;
write('Nhap so hoc sinh:'); readln(n);
for i:=1 to n do
begin
repeat
write('Nhap diem trung binh mon Tin Hoc cua ban thu ',i,'='); readln(a[i]);
until (0<a[i]) and (a[i]<=10);
end;
dem:=0;
for i:=1 to n do
if a[i]>=5 then inc(dem);
writeln('So ban co diem tren trung binh la: ',dem);
readln;
end.