#include <bits/stdc++.h>
using namespace std;
long long int ar[1000100];
int main() {
  long long int n, x, pos, ans = 0, med = 0, nxtinc = 0, check = 0;
  cin >> n >> x;
  for (int i = 1; i <= n; i++) {
    cin >> ar[i];
    if (ar[i] == x) check = 1;
  }
  if (check == 0) ar[n + 1] = x, n++, ans++;
  sort(ar + 1, ar + n + 1);
  if (ar[(n + 1) / 2] == x) {
    cout << ans << endl;
    return 0;
  } else if (ar[(n + 1) / 2] > x) {
    pos = upper_bound(ar + 1, ar + n + 1, x) - ar - 1;
    ans = ans + (n - 2 * pos);
  } else {
    pos = lower_bound(ar + 1, ar + n + 1, x) - ar - 1;
    pos++;
    ans = ans + (2 * pos - n - 1);
  }
  cout << ans << endl;
}
