#include <bits/stdc++.h>
using namespace std;
int arr[555];
bool vis[100010];
int main() {
  multiset<int> st;
  memset(vis, false, sizeof(vis));
  int n;
  cin >> n;
  int mid;
  cin >> mid;
  int mn = 10000000;
  int mx = -1;
  vector<int> vec;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    vis[x] = true;
    vec.push_back(x);
    mn = min(mn, x);
    mx = max(mx, x);
  }
  int ans = 0;
  if (!vis[mid]) {
    ans++;
    vec.push_back(mid);
    mn = min(mn, mid);
    mx = max(mx, mid);
  }
  sort(vec.begin(), vec.end());
  int len = vec.size();
  if (len % 2 == 1) {
    int midId = len / 2;
    int lId = lower_bound(vec.begin(), vec.end(), mid) - vec.begin();
    int uId = lower_bound(vec.begin(), vec.end(), mid + 1) - vec.begin();
    uId--;
    if (lId <= midId && uId >= midId) {
      cout << ans << "\n";
      return 0;
    }
    if (abs(midId - lId) > abs(midId - uId)) {
      lId = uId;
    }
    if (lId < midId) {
      ans += ((2 * (midId - lId)) - 1);
    } else {
      ans += (2 * (lId - midId));
    }
  } else {
    int midId = len / 2;
    midId--;
    int lId = lower_bound(vec.begin(), vec.end(), mid) - vec.begin();
    int uId = lower_bound(vec.begin(), vec.end(), mid + 1) - vec.begin();
    uId--;
    if (lId <= midId && uId >= midId) {
      cout << ans << "\n";
      return 0;
    }
    if (abs(midId - lId) > abs(midId - uId)) {
      lId = uId;
    }
    if (lId < midId) {
      ans += (2 * (midId - lId));
    } else {
      ans += ((2 * (lId - midId)) - 1);
    }
  }
  cout << ans << "\n";
  return 0;
}
