def Main(): n,s,k=map(int,input().split()) now=10**13 ans=-1 for i in range(n): a=int(input()) g=abs(a-s) if g