N,X=map(int,input().split()) S=list(map(int,input().split())) S_sum=sum(S) for s in S: a=(2*X-s)//2 if S_sum+a==N*X: print(X-a) exit()