#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> arr(n);
  for (int i = 0; i < n; i++) cin >> arr[i];
  int k;
  for (k = 0; k < n; k++)
    if (arr[k] == m) break;
  int N = n;
  if (k == n) {
    n++;
    arr.push_back(m);
  }
  sort(arr.begin(), arr.end());
  int temp_mid = n;
  int middle = (n + 1) / 2 - 1;
  for (int i = 0; i < middle; i++) {
    if (arr[i] == m) temp_mid = i;
  }
  int mid = temp_mid;
  temp_mid = n;
  for (int i = n - 1; i > middle; i--)
    if (arr[i] == m) {
      temp_mid = i;
    }
  if (mid == n) mid = temp_mid;
  if (m == arr[middle])
    if (N == n)
      cout << "0";
    else
      cout << "1";
  else if (mid < middle) {
    if (n == N)
      cout << n - mid - 1 - mid - 1;
    else
      cout << n - mid - 1 - mid;
  } else {
    if (n == N)
      cout << (2 * mid + 1 - n);
    else
      cout << (2 * mid + 2 - n);
  }
}
