#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, x;
  cin >> n >> x;
  vector<int> v(n);
  multiset<int> s;
  for (int i = 0; i < n; i++) cin >> v[i], s.insert(v[i]);
  int add = 0;
  if (s.find(x) == s.end()) s.insert(x), add++, v.push_back(x);
  sort(v.begin(), v.end());
  n = s.size();
  int idx;
  for (int i = (n + 1) / 2 - 1; i < n; i++) {
    if (v[i] == x) {
      idx = i;
      break;
    }
  }
  for (int i = (n + 1) / 2 - 1; i >= 0; i--) {
    if (v[i] == x) {
      idx = i;
      break;
    }
  }
  int ans = 0;
  int med = (n + 1) / 2;
  if (med == idx + 1) {
    ans = 0;
  } else if (med < idx + 1) {
    ans = idx - (n - (idx + 1));
  } else
    ans = (n - idx - 1) - idx - 1;
  cout << add + ans;
  return 0;
}
