#include <bits/stdc++.h>
int prime[1000000 + 5], in;
bool isp[1000000 + 5];
using namespace std;
int main() {
  int n, k;
  while (cin >> n >> k) {
    int ar[10000];
    for (int i = 0; i < n; i++) {
      cin >> ar[i];
    }
    int cnt = 0, tmp;
    sort(ar, ar + n);
    if (k == ar[((n + 1) / 2) - 1]) {
      cout << 0 << endl;
      continue;
    }
    while (1) {
      ar[n++] = k;
      sort(ar, ar + n);
      cnt++;
      if (ar[((n + 1) / 2) - 1] == k) {
        cout << cnt << endl;
        break;
      }
    }
  }
  return 0;
}
