func_code_string: #include <bits/stdc++.h>   using namespace std;   using bigint = long long int;   using vi = vector<int>;   using vll = vector<long long int>;   int cnt[200001];   int main() {     int N, A;     cin >> N >> A;     for (int i = 0; i < N; i++) {       int x;       cin >> x;       cnt[x]++;     }     int ans = 0;     if (cnt[A] == 0) {       ans++;       cnt[A] = 1;     }     int left = 0, right = 0;     for (int i = 1; i < A; i++) left += cnt[i];     for (int i = A + 1; i < 100001; i++) right += cnt[i];     if (left == right) {       cout << ans <<   n ;       return 0;     }     if (left > right) {       if (right + cnt[A] - 1 >= left)         cout << ans <<   n ;       else         cout << ans + left - (right + cnt[A] - 1) <<   n ;     } else if (right > left) {       if (left + cnt[A] - 1 >= right - 1)         cout << ans <<   n ;       else         cout << ans + (right - 1) - (left + cnt[A] - 1) <<   n ;     }     return 0;   }   