#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> opada;
  vector<int> opada1;
  int i, sum = 0, x;
  bool o = false;
  int in = -1;
  opada.push_back(-1);
  opada1.push_back(-1);
  for (i = 0; i < n; i++) {
    cin >> x;
    if (x == m) o = true;
    opada.push_back(x);
    opada1.push_back(x);
  }
  if (!o) {
    opada1.push_back(m), opada.push_back(m);
    sum++;
  }
  sort(opada1.begin(), opada1.end());
  sort(opada.begin(), opada.end());
  int maxx = 1e6;
  int minn = 1;
  int g = (opada.size()) / 2;
  while (opada[g] != m && opada1[g] != m) {
    opada1.push_back(maxx);
    opada.push_back(minn);
    sort(opada1.begin(), opada1.end());
    sort(opada.begin(), opada.end());
    g = (opada.size()) / 2;
    sum++;
  }
  cout << sum;
  return 0;
}
