uses crt;
var a:array[1..100]of real;
i,n,dem1,dem2,dem3,dem4:integer;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
dem1:=0;
dem2:=0;
dem3:=0;
dem4:=0;
for i:=1 to n do
begin
if (a[i]>=8) then inc(dem1);
if (6.5<=a[i]) and (a[i]<=7.9) then inc(dem2);
if (5<=a[i]) and (a[i]<=6.4) then inc(dem3);
if (a[i]<5) then inc(dem4);
end;
writeln('So hoc sinh gioi la: ',dem1);
writeln('So hoc sinh kha la: ',dem2);
writeln('So hoc sinh trung binh la: ',dem3);
writeln('So hoc sinh kem la: ',dem4);
readln;
end.