#include <bits/stdc++.h>
using namespace std;
int n, x;
int lx[5050];
int main() {
  while (scanf("%d%d", &n, &x) != EOF) {
    int ans = n;
    for (int i = 0; i < n; i++) {
      scanf("%d", &lx[i]);
    }
    while (1) {
      sort(lx, lx + n);
      if (lx[((n - 1) >> 1)] == x) break;
      lx[n++] = x;
    }
    printf("%d\n", n - ans);
  }
  return 0;
}
