#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const int INF = 1000000000;
const int MOD = 1000000007;
int main() {
  int n, x;
  cin >> n >> x;
  int k;
  int j;
  vector<int> mas(n);
  for (int i = 0; i < n; i++) {
    cin >> mas[i];
  }
  sort(mas.begin(), mas.end());
  int m = mas[(n + 1) / 2 - 1];
  if (m == x) {
    cout << 0;
    return 0;
  } else {
    k = 0;
    while (mas[(mas.size() + 1) / 2 - 1] != x) {
      mas.push_back(x);
      sort(mas.begin(), mas.end());
      k++;
    }
  }
  cout << k;
  return 0;
}
