#include <bits/stdc++.h>
using namespace std;
const int N = 500 + 50;
int n, k, a[N], s, l, r;
inline int read() {
  int x = 0, k = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') k = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 1) + (x << 3) + (c ^ 48);
    c = getchar();
  }
  return x * k;
}
int main() {
  n = read();
  k = read();
  for (int i = 1; i <= n; i++) {
    a[i] = read();
  }
  sort(a + 1, a + 1 + n);
  l = lower_bound(a + 1, a + n + 1, k) - a;
  r = upper_bound(a + 1, a + n + 1, k) - a;
  if (l > n) {
    cout << n + 1;
    return 0;
  }
  if (r == 1) {
    cout << n;
    return 0;
  }
  int minx = 9999999;
  for (int i = l; i < r; i++) {
    if ((n - i) > (i - 1)) {
      minx = min(minx, (abs((n - i) - (i - 1))) - 1);
    } else {
      minx = min(minx, abs((n - i) - (i - 1)));
    }
  }
  if (minx != 9999999) {
    cout << minx;
    return 0;
  }
  int c = 1;
  l = r;
  n++;
  int id = (n - l) > (l - 1);
  cout << abs((n - l) - (l - 1)) + c - id;
}
