#include <bits/stdc++.h>
using namespace std;
long long int binsearch(vector<long long int> &vec, long long int n,
                        long long int x) {
  long long int low, mid, high;
  low = 1;
  high = n;
  while (low <= high) {
    mid = (low + high) / 2;
    if (vec[mid] == x)
      return mid;
    else if (vec[mid] > x)
      high = mid - 1;
    else
      low = mid + 1;
  }
  return low;
}
int main() {
  long long int n, x, i, j = 0, ans, left, right, k;
  cin >> n >> x;
  vector<long long int> vec(n + 1);
  for (i = 1; i <= n; i++) cin >> vec[i];
  sort(vec.begin(), vec.end());
  vec[0] = -9999777;
  for (i = 1; i <= n; i++) {
    if (vec[i] == x) j = i;
  }
  if (j == 0) {
    j = binsearch(vec, n, x);
    if (j == n + 1)
      ans = n;
    else {
      right = n - j + 1;
      left = j - 1;
      ans = (left > right) ? (left - right) : (right - left);
      if (left < right) ans--;
    }
    ans++;
  } else if (vec[j - 1] != vec[j]) {
    left = j - 1;
    right = n - j;
    ans = (left > right) ? (left - right) : (right - left);
    if (left < right) ans--;
    if (j == (n + 1) / 2) ans = 0;
  } else if (vec[j - 1] == vec[j]) {
    k = j - 1;
    while (vec[k] == vec[k + 1]) {
      k--;
    }
    k++;
    if (k <= (n + 1) / 2 && j >= (n + 1) / 2)
      ans = 0;
    else if (j < (n + 1) / 2) {
      left = j - 1;
      right = n - j;
      ans = right - left;
      ans--;
    } else {
      left = k - 1;
      right = n - k;
      ans = left - right;
    }
  }
  cout << ans;
  return 0;
}
