Stepic 4.2 — 3 s = input() n = int(input()) k = 0 for i in range(n): a = input() if a == s: k += 1 print(k)