uses crt;
var a:array[1..100]of integer;
i,n,dem1,dem2,t:integer;
begin
clrscr;
readln(n);
for i:=1 to n do readln(a[i]);
dem1:=0;
dem2:=0;
t:=0;
for i:=1 to n do
begin
if a[i] mod 2=0 then inc(dem1)
else inc(dem2);
if 10 mod a[i]=0 then t:=t+a[i];
end;
writeln(dem1);
writeln(dem2);
writeln(t);
readln;
end.