#include <bits/stdc++.h>
using namespace std;
int A[100005];
int F[100005];
int main() {
  int n, x;
  cin >> n >> x;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &A[i]);
    F[A[i]]++;
  }
  int idx = (n + 1) / 2;
  bool wasPresent = true;
  if (!F[x]) {
    wasPresent = false;
    A[n + 1] = x;
    n++;
  }
  sort(A + 1, A + n + 1);
  int ans = 100005;
  for (int i = 1; i <= n; i++) {
    if (A[i] == x) {
      int add = 0;
      if ((i - 1) > (n - i)) {
        add = (i - 1) - (n - i);
      } else if ((i - 1) < (n - i)) {
        add = (n - i) - (i - 1) - 1;
      }
      ans = min(ans, add);
    }
  }
  if (!wasPresent) ans++;
  printf("%d\n", ans);
  return 0;
}
