/** * author: shu8Cream * created: 12.02.2021 21:19:16 **/ #include using namespace std; #define rep(i,n) for (int i=0; i<(n); i++) #define all(x) (x).begin(), (x).end() using ll = long long; using P = pair; using vi = vector; using vvi = vector; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); ll n,x; cin >> n >> x; vector s(n); rep(i,n) cin >> s[i]; ll sumS = 0; rep(i,n) sumS+=s[i]; rep(i,n){ if(s[i]%2!=0) continue; if((sumS-s[i]/2)==(n-1)*x){ cout << s[i]/2 << endl; return 0; } } }