c = 0 n,k = input().split() n = int(n) k = int(k) for i in range(n): a = int(input()) if a == k: c = c+1 else: continue print(c)