#include <bits/stdc++.h>
using namespace std;
char READ_DATA;
int SIGNAL_INPUT;
template <typename Type>
inline char ru(Type &v) {
  SIGNAL_INPUT = 1;
  while ((READ_DATA = getchar()) < '0' || READ_DATA > '9')
    if (READ_DATA == '-')
      SIGNAL_INPUT = -1;
    else if (READ_DATA == EOF)
      return EOF;
  v = READ_DATA - '0';
  while ((READ_DATA = getchar()) >= '0' && READ_DATA <= '9')
    v = v * 10 + READ_DATA - '0';
  v *= SIGNAL_INPUT;
  return 1;
}
template <typename A, typename B>
inline void ru(A &x, B &y) {
  ru(x);
  ru(y);
}
template <typename A, typename B, typename C>
inline void ru(A &x, B &y, C &z) {
  ru(x);
  ru(y);
  ru(z);
}
template <typename A, typename B, typename C, typename D>
inline void ru(A &x, B &y, C &z, D &w) {
  ru(x);
  ru(y);
  ru(z);
  ru(w);
}
struct Edge {
  int v, next;
  Edge(int _v = 0, int nxt = -1) {
    v = _v;
    next = nxt;
  }
};
const int mod = 1e9 + 7;
const int maxn = 1e5 + 2;
int n, x;
vector<int> a;
int main() {
  int ok = 0;
  ru(n, x);
  int tmp;
  for (int i = 1; i <= n; ++i) {
    ru(tmp);
    a.push_back(tmp);
  }
  sort(a.begin(), a.end());
  int ans = 0;
  while (a[(n - 1) / 2] != x) {
    ++ans;
    ++n;
    a.push_back(x);
    sort(a.begin(), a.end());
  }
  printf("%d", ans);
}
