#include <bits/stdc++.h>
using namespace std;
long long int inf = 1000000007;
long long int power(long long int a, long long int pow) {
  long long int ans = 1;
  if (a < 0) a += inf;
  while (pow) {
    if (pow % 2 == 1) {
      ans = ((ans) % inf * (a) % inf) % inf;
    }
    a = ((a) % inf * (a) % inf) % inf;
    if (a < 0) a += inf;
    pow /= 2;
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, x;
  cin >> n >> x;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    int y;
    cin >> y;
    v.push_back(y);
  }
  sort(v.begin(), v.end());
  if (v[(v.size() - 1) / 2] == x) {
    cout << 0 << "\n";
    return 0;
  }
  while (true) {
    if (v[(v.size() - 1) / 2] == x) break;
    v.push_back(x);
    sort(v.begin(), v.end());
  }
  cout << v.size() - n << "\n";
  return 0;
}
