n, x = map(int, input().split()) s = list(map(int, input().split())) sums = sum(s) for ss in s: if sums-ss//2 == (n-1)*x: print(ss//2) exit(0)