#include <bits/stdc++.h>
using namespace std;
using ld = long double;
using ll = long long;
int main() {
  int n, x;
  cin >> n >> x;
  vector<int> arr(n);
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  sort(arr.begin(), arr.end());
  int pos = (n - 1) / 2;
  if (arr[pos] == x) {
    cout << 0;
  } else if (arr[pos] > x) {
    int temp = upper_bound(arr.begin(), arr.end(), x) - arr.begin();
    cout << n - 2 * temp;
  } else {
    int temp = lower_bound(arr.begin(), arr.end(), x) - arr.begin();
    cout << 2 * temp + 1 - n;
  }
  return 0;
}
