#include <bits/stdc++.h>
using namespace std;
int main() {
  long int n, number;
  cin >> n >> number;
  bool found = 0;
  vector<long int> v;
  for (long int i = 0; i < n; i++) {
    long int a;
    cin >> a;
    if (a == number) found = true;
    v.push_back(a);
  }
  long int ans1 = 0, ans2 = 0;
  if (found == false) {
    v.push_back(number);
    ans1++;
    ans2++;
    n++;
  }
  sort(v.begin(), v.end());
  long int left = -1, right = -1;
  long int mid = (n + 1) / 2 - 1;
  for (long int i = mid; i >= 0; i--) {
    if (v[i] == number) {
      left = i;
      break;
    }
  }
  for (long int i = mid + 1; i < n; i++) {
    if (v[i] == number) {
      right = i;
      break;
    }
  }
  long int n1 = n;
  if (left != -1) {
    while (left != (n1 + 1) / 2 - 1) {
      ans1++;
      n1++;
      left++;
    }
  } else {
    ans1 = INT_MAX;
  }
  n1 = n;
  if (right != -1) {
    while (right != (n1 + 1) / 2 - 1) {
      n1++;
      ans2++;
    }
  } else {
    ans2 = INT_MAX;
  }
  cout << min(ans1, ans2) << endl;
  return 0;
}
