#include <bits/stdc++.h>
using namespace std;
const int N = 10000, oo = (1 << 29), Z = 501;
int n, x;
int arr[N];
bool foundX;
int main() {
  scanf("%d %d", &n, &x);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", arr + i);
    if (arr[i] == x) foundX = true;
  }
  sort(arr, arr + n + 1);
  int pos = 1 << 29;
  int res = 0;
  if (!foundX) {
    ++n;
    arr[n] = x;
    sort(arr, arr + n + 1);
    ++res;
  }
  int mid = (n + 1) / 2;
  for (int i = 1; i <= n; ++i) {
    if (arr[i] == x) {
      pos = min(pos, abs(mid - i));
    }
  }
  if (pos == 0)
    printf("%d\n", (res > 0) ? res : 0);
  else {
    int fX = -1, lX = -1;
    for (int i = 1; i <= n; ++i) {
      if (arr[i] == x) {
        if (fX == -1) {
          fX = i;
          lX = i;
        } else {
          lX = i;
        }
      }
    }
    int temp = n;
    int Mid1 = (temp + 1) / 2;
    if (Mid1 < lX)
      while (true) {
        ++res;
        ++temp;
        int newMid = (temp + 1) / 2;
        if (newMid >= fX && newMid <= lX) {
          break;
        }
      }
    else
      while (true) {
        ++res;
        ++temp;
        int newMid = (temp + 1) / 2;
        ++fX, ++lX;
        if (newMid >= fX && newMid <= lX) {
          break;
        }
      }
    printf("%d\n", res);
  }
  return 0;
}
