#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x;
  cin >> n >> x;
  int tmp;
  vector<int> v;
  for (int i = 0; i < n; ++i) {
    cin >> tmp;
    v.push_back(tmp);
  }
  sort(v.begin(), v.end());
  auto it = find(v.begin(), v.end(), x);
  int idx = it == v.end() ? -1 : it - v.begin();
  int added = 0;
  while (v[(n - 1) / 2] != x) {
    if (v[(n - 1) / 2] < x && idx != -1)
      v.push_back(v[n - 1] + 1);
    else if (v[(n - 1) / 2] > x && idx != -1)
      v.push_back(v[0] - 1);
    else {
      v.push_back(x);
      idx = 0;
    }
    sort(v.begin(), v.end());
    added++;
    n++;
  }
  cout << added << endl;
}
