n, x = map(int, input().split()) s = list(map(int, input().split())) t = sum(s) for i in range(n): tmp = (t - s[i]//2) // (n-1) if tmp == x: print(s[i] // 2) exit()