#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, x;
  cin >> n >> x;
  vector<int> A(n);
  for (auto &i : A) cin >> i;
  int cc = 0;
  if (find(A.begin(), A.end(), x) == A.end()) {
    A.push_back(x);
    cc++;
  }
  while (true) {
    sort(A.begin(), A.end());
    int p = A[((int)A.size() + 1) / 2 - 1];
    if (p == x) break;
    if (p < x)
      A.push_back(x + 1);
    else
      A.push_back(x - 1);
    cc++;
  }
  cout << cc << endl;
  return 0;
}
