#include <bits/stdc++.h>
#pragma warning(disable : 4786)
using namespace std;
int p[505];
int main() {
  int n, num, m;
  scanf("%d%d", &n, &num);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &p[i]);
  }
  if (n % 2)
    m = n / 2 + 1;
  else
    m = n / 2;
  sort(p + 1, p + 1 + n);
  int flag = 0;
  int first, last;
  for (int i = 1; i <= n; i++) {
    if (p[i] == num && !flag) {
      first = i;
      last = i;
      flag = 1;
    }
    if (flag && p[i] == num) {
      last = i;
    }
  }
  if (flag && first <= m && last >= m) {
    puts("0");
  } else if (flag && first > m) {
    printf("%d\n", first - 1 - (n - first));
  } else if (flag) {
    printf("%d\n", (n - last) - (last - 1) - 1);
  } else {
    int l = 1, r = n;
    while (l <= r) {
      int mid = (l + r) / 2;
      if (p[mid] <= num)
        l = mid + 1;
      else
        r = mid - 1;
    }
    int pp;
    if (l > m)
      pp = l - 1 - (n - l);
    else
      pp = (n - l + 1) - (l - 1);
    printf("%d\n", pp);
  }
  return 0;
}
