#include <bits/stdc++.h>
using namespace std;
const int INF = (1LL << 31) - 1;
int main() {
  int a[1005];
  int n, x;
  cin >> n >> x;
  bool has = false;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    if (a[i] == x) has = true;
  }
  if (!has) {
    ++n;
    a[n] = x;
  }
  int res = 0, dif = INF, id;
  while (dif != 0) {
    sort(a + 1, a + n + 1);
    int mid = (n + 1) / 2;
    for (int i = 1; i <= n; ++i)
      if (a[i] == x) {
        int t = abs(mid - i);
        dif = min(dif, t);
        id = i;
      }
    if (id > mid) {
      ++n;
      a[n] = 100000;
    } else {
      ++n;
      a[n] = 1;
    }
    if (dif) ++res;
  }
  cout << res + (has == false) << endl;
  return 0;
}
