#include <bits/stdc++.h>
using namespace std;
long long int M = 1000000007;
long long int dp[101][2];
long long int gcd(long long int a, long long int b) {
  return (b == 0) ? a : gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  long long int l = (a * b);
  l = l / gcd(a, b);
  return l;
}
long long int po(long long int a, long long int b) {
  if (b == 0) return 1;
  long long int temp = po(a, b / 2);
  long long int z = ((temp % M) * (temp % M)) % M;
  if (b % 2)
    return ((z % M) * (a % M)) % M;
  else
    return z % M;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t = 1;
  long long int xx = 1;
  while (t--) {
    long long int n, med;
    cin >> n >> med;
    long long int a[n];
    for (long long int i = 0; i < n; i++) cin >> a[i];
    sort(a, a + n);
    long long int ind;
    if (n % 2 == 1) {
      ind = n / 2;
    } else {
      ind = n / 2 - 1;
    }
    if (a[ind] == med) {
      cout << 0;
      break;
    }
    long long int low = 0, high = 0;
    for (long long int i = 0; i < n; i++) {
      if (a[i] < med)
        low++;
      else if (a[i] > med)
        high++;
    }
    long long int left = n - (low + high);
    if (low < high)
      low += left;
    else
      high += left;
    long long int ans;
    if (high > low)
      ans = high - low;
    else
      ans = low - high + 1;
    cout << ans;
  }
  return 0;
}
