#include <bits/stdc++.h>
using namespace std;
const int dr[4] = {-1, 0, 1, 0};
const int dc[4] = {0, 1, 0, -1};
const int INF = 1e9;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, x;
  cin >> n >> x;
  bool exist = false;
  deque<int> arr(n);
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] == x) exist = true;
  }
  int answer = 0;
  if (!exist) {
    answer++;
    n++;
    arr.push_back(x);
  }
  while (true) {
    sort(arr.begin(), arr.end());
    if (arr[(n + 1) / 2 - 1] == x) break;
    if (arr[(n + 1) / 2 - 1] < x)
      arr.push_back(100000);
    else
      arr.push_front(1);
    answer++;
    n++;
  }
  cout << answer;
  return 0;
}
