Var
Gray,Brown,Green,Cyan,Blue,Yellow,Orange,Red:boolean;
n,d,total,i:longint;
a:array[0..105] of longint;
Begin
gray:=false; brown:=false; green:=false; cyan:=false; blue:=false; yellow:=false; orange:=false; red:=false; d:=0; total:=0;
Readln(n);
For i:=1 to n do
Begin
Read(a[i]);
If (a[i]>=1) and (a[i]<=399) then 
if not gray then begin gray:=true; inc(total); end;
If (a[i]>=400) and (a[i]<=799) then
if not brown then begin brown:=true; inc(total); end;
If (a[i]>=800) and (a[i]<=1199) then 
if not green then begin green:=true; inc(total); end;
If (a[i]>=1200) and (a[i]<=1599) then 
if not cyan then begin cyan:=true; inc(total); end;
If (a[i]>=1600) and (a[i]<=1999) then 
if not blue then begin blue:=true; inc(total); end;
If (a[i]>=2000) and (a[i]<=2399) then 
if not yellow then begin yellow:=true; inc(total); end;
If (a[i]>=2400) and (a[i]<=2799) then 
if not orange then begin orange:=true; inc(total); end;
If (a[i]>=2800) and (a[i]<=3199) then 
if not red then begin red:=true; inc(total); end;
If a[i]>=3200 then inc(d);
End;
If total=0 then write('1',' ')
else Write(total,' ');
Total:=Total+d;
If total>8 then Write('8')
else Write(total);
End.