import itertools n,k=map(int,input().split()) l=[int(input()) for _ in range(n)] if k in l: print(k); exit l=[x for x in l if x