#include <bits/stdc++.h>
using namespace std;
bool fun(pair<int, int> p1, pair<int, int> p2) {
  if (p1.first > p2.first || p1.first == p2.first && p1.second < p2.second)
    return true;
  return false;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.precision(10);
  int n, x;
  cin >> n >> x;
  bool present = false;
  int a = 0, b = 0, eq = 0;
  for (int i = 0; i < n; i++) {
    int y;
    cin >> y;
    if (y < x)
      a++;
    else if (y > x)
      b++;
    else {
      eq++;
    }
  }
  if (eq <= 1) {
    if (a == b || a == b - 1) {
      if (eq == 1)
        cout << 0;
      else
        cout << 1;
    } else if (a < b) {
      if (eq == 1)
        cout << b - a - 1;
      else
        cout << b - a;
    } else {
      if (eq == 1)
        cout << a - b;
      else
        cout << a - b + 1;
    }
  } else {
    eq--;
    if (a == b || a == b - 1) {
      cout << 0;
    } else {
      if (a < b)
        cout << max((b - 1 - a) - eq, 0);
      else {
        cout << max((a - b) - eq, 0);
      }
    }
  }
  return 0;
}
