#include <bits/stdc++.h>
using namespace std;
vector<int> A;
long long n, x;
long long first(long long ans1, long long ans2, int t) {
  int a = ((t + 1) / 2) - 1;
  if (A[a] == x) return 0;
  for (long long i = 0; i < t; i++) {
    if (A[i] == x && i < a) {
      ans1 = min(ans1, (t - (i + 1)) - i);
    } else if (A[i] == x && i > a) {
      ans2 = min(ans2, i - (t - (i + 1)));
    }
  }
  ans1--;
  return min(ans1, ans2);
}
int main() {
  cin >> n >> x;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    A.push_back(x);
  }
  sort(A.begin(), A.end());
  int a = ((n + 1) / 2) - 1;
  if (A[a] == x) {
    cout << 0;
    return 0;
  }
  long long ans1 = 1e18, ans2 = 1e18;
  long long ans = first(ans1, ans2, A.size());
  if (ans > 1e17) {
    A.push_back(x);
    sort(A.begin(), A.end());
    ans = first(ans1, ans2, A.size());
    ans++;
  }
  cout << ans;
}
