#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
int32_t main(int32_t argc, char const *argv[]) {
  long long n, x;
  cin >> n >> x;
  long long a[500000];
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long i;
  sort(a, a + n);
  for (i = 0; a[(n + 1) / 2 - 1] != x; i++) a[n++] = x, sort(a, a + n);
  cout << i << "\n";
  return 0;
}
