#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
template <class T>
bool ckmin(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const long double pii = 3.14159265359;
const int MOD = 1000000007;
const char nl = '\n';
const int MX = 200001;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char* x) { cerr << '\"' << x << '\"'; }
void __print(const string& x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V>& x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T& x) {
  int first = 0;
  cerr << '{';
  for (auto& i : x) cerr << (first++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
void solve() {
  int N, K;
  cin >> N >> K;
  vector<int> v(N);
  for (auto& i : v) cin >> i;
  sort(v.begin(), v.end());
  int off = 0;
  if (!binary_search(v.begin(), v.end(), K)) {
    off++;
    v.push_back(K);
    N++;
    sort(v.begin(), v.end());
  }
  int i1 = lower_bound(v.begin(), v.end(), K) - v.begin();
  int i2 = upper_bound(v.begin(), v.end(), K) - v.begin();
  i1++;
  if (i1 > (N + 1) / 2) {
    while (v[(N + 1) / 2 - 1] != K) {
      v.push_back(INT_MAX), N++, off++;
      ;
      ;
    }
  } else {
    reverse(v.begin(), v.end());
    while (v[N - 1 - ((N + 1) / 2 - 1)] != K) {
      v.push_back(0);
      N++;
      off++;
    }
  }
  cout << off;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int Test_case = 1;
  while (Test_case-- != 0) {
    solve();
  }
  return 0;
}
