#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
vector<int> v;
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, k, m, x;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> x;
    v.push_back(x);
  }
  int l = n, cnt = 0;
  sort(v.begin(), v.end());
  while (1) {
    if (l & 1)
      m = l / 2;
    else
      m = (l / 2) - 1;
    if (v[m] != k) {
      v.push_back(k);
      l++;
      cnt++;
    } else
      break;
    sort(v.begin(), v.end());
  }
  cout << cnt;
  return 0;
}
