#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x;
  cin >> n >> x;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    v.push_back(t);
  }
  sort(v.begin(), v.end());
  auto low = lower_bound(v.begin(), v.end(), x),
       up = upper_bound(v.begin(), v.end(), x);
  int a = low - v.begin(), c = v.end() - up, b = n - a - c,
      r = max(1, max(c - a, a - c + 1));
  cout << max(0, r - b);
}
