#include <bits/stdc++.h>
using namespace std;
int n, k, a[500 + 5], ans, sum, sum1, sum2, t, tmin, tmax;
void ask(int x) {
  int l = 1, r = n;
  while (l <= r) {
    int minn = (l + r) / 2;
    if (a[minn] > k) {
      r = minn;
      continue;
    } else if (a[minn] < k) {
      l = minn + 1;
      continue;
    } else if (a[minn] == k) {
      t = minn;
      return;
    }
  }
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    if (a[i] == k) {
      sum++;
    }
  }
  if (sum >= 1) {
    sort(a + 1, a + 1 + n);
    ask(k);
  } else {
    ans++, sum++;
    ++n;
    a[n] = k;
    sort(a + 1, a + 1 + n);
    ask(k);
  }
  tmin = t, tmax = t;
  if (sum != 1) {
    for (int i = t; a[i] == k; --i) sum1++;
    for (int i = t; a[i] == k; ++i) sum2++;
    tmin = t - sum1 + 1;
    tmax = t + sum2 - 1;
  }
  int zw = (n + 1) / 2;
  if (tmin > zw) {
    for (int i = 1;; ++i) {
      if ((n + i + 1) / 2 == tmin) {
        ans += i;
        break;
      }
    }
  } else if (tmax < zw) {
    for (int i = 1;; ++i) {
      if ((n + i + 1) / 2 == tmax + i) {
        ans += i;
        break;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
