#include <bits/stdc++.h>
using namespace std;
int a[1000];
int main() {
  int n, x;
  while (scanf("%d %d", &n, &x) != EOF) {
    bool flag = 0;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
      if (a[i] == x) flag = 1;
    }
    if (flag == 0) a[++n] = x;
    sort(a + 1, a + n + 1);
    n++;
    int p = n / 2, q = n / 2;
    int cnt = 0;
    if (flag == 0) cnt++;
    while (1) {
      if (p > 0 && a[p] == x) {
        if (p != n / 2) cnt += ((n - p - 1) - p);
        break;
      }
      if (q < n && a[q] == x) {
        cnt += (q - 1) - (n - q - 1);
        break;
      }
      p--, q++;
    }
    cout << cnt << endl;
  }
  return 0;
}
