#include <bits/stdc++.h>
using namespace std;
int main() {
  int l = 0, r = 0, eq = 0;
  int n, x;
  cin >> n >> x;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > x) r++;
    if (a[i] < x) l++;
  }
  eq = n - l - r;
  int rs = 0;
  while (l >= (r + eq) || r > (l + eq)) eq++, rs++;
  cout << rs << endl;
}
