#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[100000], b[100000], k, c = 0;
  scanf("%d", &n);
  scanf("%d", &k);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
  }
  n++;
  while (1) {
    sort(a + 1, a + n);
    if (a[n / 2] == k) {
      printf("%d", c);
      return 0;
    }
    a[n] = k;
    n++;
    c++;
  }
}
