#include <bits/stdc++.h>
const double PI = 3.141592653589793238460;
using namespace std;
vector<int> dp(100005, -1);
vector<int> a;
void seive() {
  int i, j;
  for (i = 2; i * i < 100001; i++) {
    if (dp[i] == -1) {
      for (j = i * i; j <= 100000; j += i) dp[j] = 1;
    }
  }
  for (i = 2; i <= 100000; i++) {
    if (dp[i] == -1) a.push_back(i);
  }
}
void solve() {
  int i, nega = 0, n, k, j, ans = 0;
  cin >> n >> k;
  vector<int> arr;
  for (i = 0; i < n; i++) {
    cin >> j;
    arr.push_back(j);
    if (j == k) nega++;
  }
  if (nega == 0) {
    arr.push_back(k);
    ans++;
  }
  sort(arr.begin(), arr.end());
  n = arr.size();
  j = (n - 1) / 2;
  if (arr[j] == k) {
    cout << ans << '\n';
    return;
  }
  int pos, l = 0, r = n - 1;
  while (l <= r) {
    int mid = l + (r - l) / 2;
    if (arr[mid] == k) {
      pos = mid;
      r = mid - 1;
    } else if (arr[mid] < k) {
      l = mid + 1;
    } else
      r = mid - 1;
  }
  if (pos > j) {
    if (n % 2)
      ans += (2 * (pos - j));
    else
      ans += ((2 * (pos - j)) - 1);
  } else {
    while (arr[pos + 1] == k) pos++;
    if (n % 2 == 0)
      ans += (2 * (j - pos));
    else
      ans += ((2 * (j - pos)) - 1);
  }
  cout << ans << '\n';
  return;
}
int main() {
  int t;
  t = 1;
  while (t-- > 0) {
    solve();
  }
  return 0;
}
