#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x;
  cin >> n >> x;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  int j = lower_bound(a.begin(), a.end(), x) - a.begin();
  int ans = 0;
  while (a[(a.size() + 1) / 2 - 1] != x) {
    a.insert(a.begin() + j, x);
    ans++;
  }
  cout << ans << '\n';
  return 0;
}
