#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const double pi = acos(-1.0);
const double eps = 1e-9;
const int MAX_SIZE = 50;
const int dX[] = {-1, 1, 0, 0, -1, 1, -1, 1};
const int dY[] = {0, 0, -1, 1, 1, -1, -1, 1};
template <class S, class T>
ostream& operator<<(ostream& o, const pair<S, T>& a) {
  o << a.first << " " << a.second << " ";
  return o;
}
template <class S, class T>
ostream& operator<<(ostream& o, const map<S, T>& a) {
  for (auto& it : (a)) o << (it);
  return o;
}
template <class S>
ostream& operator<<(ostream& o, const vector<S>& a) {
  for (auto& it : (a)) o << (it) << " ";
  o << "\n";
  return o;
}
template <class S>
ostream& operator<<(ostream& o, const vector<vector<S> >& a) {
  for (auto& it : (a)) o << (it);
  return o;
}
template <class S>
ostream& operator<<(ostream& o, const set<S>& a) {
  for (auto& it : (a)) o << (it) << " ";
  o << "\n";
  return o;
}
const long long MAX = 1e5 + 10;
int x[MAX];
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int i, n, req, l, r, ans;
  cin >> n >> req;
  for (i = (1); (((1) > 0) - ((1) < 0)) * i < (((1) > 0) - ((1) < 0)) * (n + 1);
       i += (1))
    cin >> x[i];
  sort(x + 1, x + n + 1);
  ans = 0;
  for (r = n; r > 0 && x[r] > req; r--)
    ;
  for (l = 1; l <= n && x[l] < req; l++)
    ;
  if (l > r) {
    ans = 1;
    n++;
    r = l;
  }
  if (!(l <= (n + 1) / 2 && (n + 1) / 2 <= r)) {
    if (r < (n + 1) / 2)
      ans += n - 2 * r;
    else
      ans += 2 * l - 1 - n;
  }
  cout << ans;
  return 0;
}
