#include <bits/stdc++.h>
using namespace std;
int med(vector<int> vc) {
  sort(vc.begin(), vc.end());
  int n = vc.size();
  int p = (n + 1) / 2;
  return vc[p - 1];
}
signed main() {
  int n, x;
  cin >> n >> x;
  vector<int> vc;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    vc.push_back(a);
  }
  if (med(vc) == x) {
    cout << 0 << endl;
  } else {
    for (int i = 1; i <= 2005; i++) {
      vc.push_back(x);
      if (med(vc) == x) {
        cout << i << endl;
        exit(0);
      }
    }
  }
}
