#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(NULL);
  ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  vector<int> v(n + 1);
  for (int i = 1; i <= n; i++) {
    cin >> v[i];
  }
  sort(v.begin(), v.end());
  int ans = 0;
  while (v[(n + 1) / 2] != m) {
    v.push_back(m);
    sort(v.begin(), v.end());
    n++;
    ans++;
  }
  cout << ans;
  return 0;
}
