#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  bool flag = false;
  int n, x;
  cin >> n >> x;
  int cnt = 0;
  vector<int> v;
  for (long long i = 0; i < (n); ++i) {
    int temp;
    cin >> temp;
    if (temp == x) flag = true;
    v.push_back(temp);
  }
  if (!flag) {
    v.push_back(x);
    ++cnt;
  }
  n = v.size();
  sort(v.begin(), v.end());
  int midVal = v[(n - 1) / 2];
  if (midVal > x) {
    int idx = -1;
    for (long long i = 0; i < (n); ++i)
      if (v[i] == x) idx = i;
    cnt += (n - 2 * (idx + 1));
  } else if (midVal < x) {
    int idx = -1;
    for (long long i = 0; i < (n); ++i)
      if (v[i] == x) {
        idx = i;
        break;
      }
    cnt += (2 * idx + 1 - n);
  }
  cout << cnt << '\n';
  return 0;
}
