#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x;
  cin >> n >> x;
  vector<int> arr(n);
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr.begin(), arr.end());
  int ks = 0, kf;
  while (ks < n && arr[ks] < x) ks++;
  kf = ks;
  while (kf < n && arr[kf] == x) kf++;
  int num = 0;
  if (ks == kf) {
    n++;
    kf++;
    num++;
  }
  if (((n + 1) / 2 - 1) >= ks && ((n + 1) / 2 - 1) < kf) {
    cout << num << endl;
    return 0;
  }
  if (((n + 1) / 2 - 1) >= kf) {
    while (((n + 1) / 2 - 1) >= kf) {
      num++;
      kf++;
      n++;
    }
    cout << num << endl;
    return 0;
  }
  while (((n + 1) / 2 - 1) < ks) {
    num++;
    n++;
  }
  cout << num << endl;
  return 0;
}
