#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, -1, 0, 0, 1, 1, -1, -1};
int dy[] = {0, 0, 1, -1, -1, 1, 1, -1};
int biton(int n, int pos) { return n = n | (1 << pos); }
int bitoff(int n, int pos) { return n = n & ~(1 << pos); }
bool bitcheck(int n, int pos) { return (bool)(n & (1 << pos)); }
inline int nxt() {
  int a;
  scanf("%d", &a);
  return a;
}
inline long long int NXT() {
  long long int a;
  scanf("%lld", &a);
  return a;
}
int ara[100010];
int upper(int x, int high) {
  int low = 0;
  int ans = -1;
  while (low <= high) {
    int mid = (high + low) / 2;
    if (ara[mid] == x) {
      ans = mid;
      low = mid + 1;
    }
    if (ara[mid] > x) {
      high = mid - 1;
    } else
      low = mid + 1;
  }
  return ans;
}
int lower(int x, int high) {
  int low = 0;
  int ans = -1;
  while (low <= high) {
    int mid = (high + low) / 2;
    if (ara[mid] == x) {
      ans = mid;
      high = mid - 1;
    }
    if (ara[mid] > x) {
      high = mid - 1;
    } else
      low = mid + 1;
  }
  return ans;
}
int main() {
  int n = nxt(), k = nxt();
  int flag = 1;
  for (int i = 0; i < n; i++) {
    ara[i] = nxt();
    if (ara[i] == k) flag = 0;
  }
  int ans = 0;
  if (flag) {
    ara[n++] = k;
    ans = 1;
  }
  sort(ara, ara + n);
  deque<int> dq;
  for (int i = 0; i < n; i++) dq.push_back(ara[i]);
  while (true) {
    int n = dq.size();
    int median = (n + 1) / 2;
    if (dq[median - 1] == k)
      break;
    else if (dq[median - 1] > k) {
      dq.push_front(1);
      ans++;
    } else {
      dq.push_back(100000);
      ans++;
    }
  }
  cout << ans << endl;
}
