#include <bits/stdc++.h>
using namespace std;
int n, x, arr[1000];
int main() {
  scanf("%d%d", &n, &x);
  bool is = false;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &arr[i]);
    if (arr[i] == x) is = true;
  }
  if (!is) arr[++n] = x;
  sort(arr + 1, arr + n + 1);
  int minpos = n * 2, maxpos = -5;
  for (int i = 1; i <= n; i++)
    if (arr[i] == x) {
      minpos = min(i, minpos);
      maxpos = max(i, maxpos);
    };
  if (minpos <= (n + 1) / 2 && maxpos >= (n + 1) / 2) {
    printf("%d\n", !is);
    return 0;
  }
  int ans = 0;
  if (maxpos < (n + 1) / 2) {
    while (maxpos < (n + 1 + ans) / 2) ans++, maxpos++;
  } else {
    while (minpos > (n + 1 + ans) / 2) ans++;
  }
  printf("%d\n", ans + !is);
  return 0;
}
