#include <bits/stdc++.h>
using namespace std;
clock_t time_p = clock();
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, x, cnt = 0;
  cin >> n >> x;
  vector<int> a(n);
  bool found = false;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == x) found = true;
  }
  if (!found) {
    a.push_back(x);
    cnt++;
  }
  sort(a.begin(), a.end());
  vector<int>::iterator it = lower_bound(a.begin(), a.end(), x);
  int p = it - a.begin(), q = (a.size() + 1) / 2;
  q--;
  if (p < q) {
    while (p + 1 < n && a[p + 1] == x && p < q) {
      p++;
    }
  } else if (p > q) {
    while (p - 1 >= 0 && a[p - 1] == x && p > q) {
      p--;
    }
  }
  if (p == q) {
    cout << cnt << "\n";
    return 0;
  }
  int c2 = 2 * abs(p - q);
  if ((p > q && a.size() % 2 == 0) || (p < q && a.size() % 2)) c2--;
  cout << cnt + c2;
  cerr << "\nTime taken : " << (float)(clock() - time_p) / CLOCKS_PER_SEC
       << " sec\n";
  return 0;
}
