var n,k,i,num:integer;
begin
readln(n);
for i:=1 to n do begin
readln(num);
if num mod 10 =6 then inc(k);
end;
writeln(k);
end.
ask_numbers = int(input())
number_list = []
for n in range(ask_numbers):
number = str(input())
number_list.append(number)
second_list = []
for item in number_list:
if item[-1] == '6':
second_list.append(item)
print(len(second_list))
var n,k,i,num:integer;
begin
readln(n);
for i:=1 to n do begin
readln(num);
if num mod 10 =6 then inc(k);
end;
writeln(k);
end.
ask_numbers = int(input())
number_list = []
for n in range(ask_numbers):
number = str(input())
number_list.append(number)
second_list = []
for item in number_list:
if item[-1] == '6':
second_list.append(item)
print(len(second_list))