#include <bits/stdc++.h>
using namespace std;
int arr[600];
int main() {
  int n, median;
  int less = 0, more = 0, equal = 0, ans = 0;
  cin >> n >> median;
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
    if (median == arr[i]) {
      ++equal;
    }
    if (arr[i] > median) {
      ++more;
    }
    if (arr[i] < median) {
      ++less;
    }
  }
  if (n == 1) {
    if (median == arr[0]) {
      cout << 0;
      return 0;
    }
    if (median > arr[0]) {
      cout << 2;
      return 0;
    }
    cout << 1;
    return 0;
  }
  if (!equal) {
    ++equal;
    ++n;
    ++ans;
  }
  if (less == more || less == more - 1 ||
      (more < less && more + equal > n / 2) ||
      (less < more && less + equal > n >= n / 2) || (equal >= more + less)) {
    cout << ans;
    return 0;
  }
  if (more < less) {
    cout << less - equal - more + 1 + ans;
    return 0;
  }
  cout << more - less - equal + ans;
}
