#include <bits/stdc++.h>
using namespace std;
long long arr[505];
long long get(long long size) { return (size + 1) >> 1; }
long long s1(long long n, long long cur) {
  long long lft = n, rgt = 1e18;
  long long ans = -1;
  while (lft <= rgt) {
    long long mid = (lft + rgt) >> 1;
    long long median = get(mid);
    if (median == (cur + (mid - n))) {
      ans = (mid - n);
      rgt = mid - 1;
    }
    if (median > (cur + (mid - n))) {
      lft = mid + 1;
    } else {
      rgt = mid - 1;
    }
  }
  return ans;
}
long long s2(long long n, long long cur) {
  long long lft = n, rgt = 1e18;
  long long ans = -1;
  while (lft <= rgt) {
    long long mid = (lft + rgt) >> 1;
    long long median = get(mid);
    if (median >= cur) {
      if (median == cur) ans = (mid - n);
      rgt = mid - 1;
    } else {
      lft = mid + 1;
    }
  }
  return ans;
}
int main() {
  long long n, x;
  scanf("%lld %lld", &n, &x);
  bool f = false;
  for (long long i = 0; i < n; i++) {
    scanf("%lld", &arr[i]);
    f |= (arr[i] == x);
  }
  if (f == false) {
    arr[n] = x;
    n++;
  }
  sort(arr, arr + n);
  vector<long long> pos;
  for (long long i = 0; i < n; i++) {
    if (arr[i] == x) {
      pos.push_back(i + 1);
    }
  }
  long long ans = 1e18;
  for (long long i : pos) {
    long long median = get(n);
    if (i < median) {
      ans = min(ans, s1(n, i) + (f == false));
    } else {
      ans = min(ans, s2(n, i) + (f == false));
    }
  }
  cout << ans << endl;
}
