#include <bits/stdc++.h>
using namespace std;
int n, x;
vector<int> a;
int ans = 0;
int main() {
  cin >> n >> x;
  a.assign(n, 0);
  for (int i = 0; i < n; ++i) cin >> a[i];
  sort(a.begin(), a.end());
  int l = 0, r = n - 1;
  while (l < n && a[l] < x) ++l;
  while (r >= 0 && a[r] > x) --r;
  if (l < n && a[l] != x || l == n) ++n, ++r, ++ans;
  int a1 = 0, a2 = 0, a3 = 0, nn = n, ll = l, rr = r;
  while ((nn - 1) / 2 > rr) ++ll, ++rr, ++nn, ++a1;
  nn = n, ll = l, rr = r;
  while ((nn - 1) / 2 < ll) ++nn, ++a2;
  ans += (n - 1) / 2 >= l && (n - 1) / 2 <= r ? 0 : max(a1, a2);
  cout << ans << endl;
  return 0;
}
