#include <bits/stdc++.h>
const long long MOD = 1000 * 1000 * 1000 + 7;
const long long MOD1 = 998244353;
const long long INF = 1ll * 1000 * 1000 * 1000 * 1000 * 1000 * 1000 + 7;
using namespace std;
long long power(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = (long long)(res * x);
    y = y >> 1;
    if (x <= 100000000) x = (long long)(x * x);
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, ele;
  cin >> n >> ele;
  vector<long long> a(n);
  for (int(i) = (0); (i) < (n); ++(i)) cin >> a[i];
  sort(a.begin(), a.end());
  if (binary_search(a.begin(), a.end(), ele)) {
    if (a[(n - 1) / 2] == ele)
      cout << 0;
    else {
      long long pos1 = -1;
      long long pos2 = -1;
      for (int i = (n - 1) / 2; i < n; i++) {
        if (a[i] == ele) {
          pos2 = i;
          break;
        }
      }
      for (int i = (n - 1) / 2; i >= 0; i--) {
        if (a[i] == ele) {
          pos1 = i;
          break;
        }
      }
      long long x1 = INF;
      long long x2 = INF;
      if (pos1 != -1) {
        x1 = n - 1 - 2 * pos1;
        long long lowx = x1 - 1;
        if (n + lowx - 1 == 2 * (pos1 + lowx) + 1) x1 = lowx;
      }
      if (pos2 != -1) {
        x2 = 2 * pos2 - n + 1;
        long long lowx = x2 - 1;
        if (n + lowx - 1 == 2 * pos2) x2 = lowx;
      }
      cout << min(x1, x2);
    }
  } else {
    a.push_back(ele);
    sort(a.begin(), a.end());
    long long ans = 1;
    n += 1;
    if (a[(n - 1) / 2] == ele)
      cout << ans;
    else {
      long long fin_pos = lower_bound(a.begin(), a.end(), ele) - a.begin();
      if (fin_pos < (n - 1) / 2) {
        long long x1 = n - 1 - 2 * fin_pos;
        long long lowx = x1 - 1;
        if (n + lowx - 1 == 2 * (fin_pos + lowx) + 1) x1 = lowx;
        cout << x1 + 1;
      } else {
        long long x2 = 2 * fin_pos - n + 1;
        long long lowx = x2 - 1;
        if (n + lowx - 1 == 2 * fin_pos) x2 = lowx;
        cout << x2 + 1;
      }
    }
  }
  return 0;
}
