#include <bits/stdc++.h>
using namespace std;
int n, x;
deque<int> a;
void next(int n, int x, deque<int> a) {
  int less = 0;
  int more = 0;
  int steps = 1;
  for (int i = 0; i < n; i++) {
    if (a[i] < x) {
      less++;
    } else {
      if (a[i] > x) {
        more++;
      } else {
        steps = 0;
      }
    }
  }
  if ((less + more) < (n - 1)) {
    for (int i = (n - less - more - 1); i > 0; i--) {
      if (more > less) {
        less++;
      } else {
        more++;
      }
    }
  }
  if (more > less) {
    steps += (more - less - 1);
  } else {
    steps += (less - more);
  }
  cout << steps << endl;
}
int main() {
  cin >> n >> x;
  a.resize(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  next(n, x, a);
  return 0;
}
