#include <bits/stdc++.h>
using namespace std;
std::vector<long long> v;
long long binarySearch(long long l, long long r, long long x) {
  if (r >= l) {
    long long mid = l + (r - l) / 2;
    if (v[mid] == x) return mid;
    if (v[mid] > x) return binarySearch(l, mid - 1, x);
    return binarySearch(mid + 1, r, x);
  }
  return -1;
}
long long median(long long n) {
  long long i = floor((float)(n + 1) / 2);
  return i;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, x, pos, l, u, ans = 0;
  cin >> n >> x;
  long long a[n + 1];
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    v.push_back(a[i]);
  }
  sort(v.begin(), v.end());
  pos = binarySearch(0, n - 1, x);
  if (pos == -1) {
    v.push_back(x);
    ans++;
    sort(v.begin(), v.end());
    pos = binarySearch(0, n, x);
  }
  while (v[pos - 1] == x) {
    pos--;
  }
  long long m = v[median(v.size()) - 1];
  while (x != m) {
    v.insert(v.begin() + pos, x);
    m = v[median(v.size()) - 1];
    ans++;
  }
  cout << ans;
  return (0);
}
