var first, n, i, coun;
begin
read(first);
for i := 2 to 9 do begin
read(n);
if n > first then coun := coun + 1;
end
write(coun);
var first, n, i, coun;
begin
read(first);
for i := 2 to 9 do begin
read(n);
if n > first then coun := coun + 1;
end
write(coun);
end