#include <bits/stdc++.h>
using namespace std;
int V[501], n;
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &V[i]);
  sort(V, V + n + 1);
  int lo = 0, hi = n + 1, mid;
  while (hi - lo > 1) {
    mid = (lo + hi) / 2;
    if (V[mid] < m)
      lo = mid;
    else
      hi = mid;
  }
  for (int i = hi; i <= n && V[i] == m; i++) lo++;
  int cnt = 0;
  while (((1 + n) / 2) < hi || ((1 + n) / 2) > lo) cnt++, n++, lo++;
  printf("%d\n", cnt);
}
