#include #include #include using namespace std; #define LL long long int main() { int N; cin >> N; LL X, sum = 0; cin >> X; vector S(N); for (int i = 0; i < N; i++) { cin >> S[i]; sum += S[i]; } for (int i = 0; i < N; i++) { if ((S[i] & 1) == 1) { continue; } if (2 * sum - S[i] == 2 * (N - 1) * X) { cout << S[i] / 2 << endl; } } return 0; }