n = int(input())
c = 0

for _ in range(n):
    if "зайка" in input():
        c += 1

print(c)