N, K = map(int, input().split())
list = [int(x) for x in input().split()]
if N in list:
    count = list.count(N)
    print(count)
elif K in list:
    count = list.count(K)
    print(count)
else:
    print(0)

d97fcf2647b73b027cf34937f024f8b3f568491e
<mask token>

<mask token>
if N in list:
    count = list.count(N)
    print(count)
elif K in list:
    count = list.count(K)
    print(count)
else:
    print(0)

N, K = map(int, input().split())
list = [int(x) for x in input().split()]
if N in list:
    count = list.count(N)
    print(count)
elif K in list:
    count = list.count(K)
    print(count)
else:
    print(0)
