#include <bits/stdc++.h>
using namespace std;
template <typename T>
using vec = vector<T>;
template <typename T>
using deq = deque<T>;
template <typename K, typename V>
using hmap = unordered_map<K, V>;
using str = string;
using vb = vec<bool>;
using i3 = int32_t;
using i6 = int64_t;
using i64 = int64_t;
using u3 = uint32_t;
using u6 = uint64_t;
using d6 = long double;
using p3 = pair<i3, i3>;
using vi3 = vec<i3>;
using vp3 = vec<p3>;
using p6 = pair<i6, i6>;
using vi6 = vec<i6>;
using vp6 = vec<p6>;
using vv = vec<vi6>;
using dp6 = deq<p6>;
using di6 = deq<i6>;
using mi6 = map<i6, i6>;
using mp6 = map<p6, i6>;
using si6 = set<i6>;
using hi6 = hmap<i6, i6>;
using graph = vv;
using matrix = vv;
const d6 EPS = 1 / 1000000.0;
const i6 INF = INT64_MAX / 4;
const i6 NINF = -INF;
const i6 ZERO = 0;
const i6 ONE = 1;
namespace std {
template <typename T1, typename T2>
struct hash<pair<T1, T2>> {
  std::size_t operator()(const pair<T1, T2>& pair) const noexcept {
    return hash<T1>()(pair.first) ^ hash<T2>()(pair.second);
  }
};
}  // namespace std
template <typename T1, typename T2>
istream& operator>>(istream& stream, pair<T1, T2>& p) {
  stream >> p.first;
  stream >> p.second;
  return stream;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& stream, const pair<T1, T2>& p) {
  return stream << p.first << " " << p.second;
}
template <typename T>
istream& operator>>(istream& stream, deq<T>& v) {
  if (v.empty()) {
    u6 len;
    stream >> len;
    v.assign(len, T());
  }
  for (auto i = 0; i < (i6)v.size(); i++) {
    stream >> v[i];
  }
  return stream;
}
template <typename T>
ostream& operator<<(ostream& stream, const deq<T>& v) {
  if (!v.empty()) {
    stream << v[0];
  }
  for (auto i = 1; i < (i6)v.size(); i++) {
    stream << " " << v[i];
  }
  return stream;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  i6 n, m;
  cin >> n >> m;
  di6 v(n);
  cin >> v;
  i6 res = 0;
  if (count_if(v.begin(), v.end(), [&m](i6 x) { return x == m; }) == 0) {
    res += 1;
    v.push_back(m);
  }
  sort(v.begin(), v.end());
  i6 f = v[0];
  i6 l = v[(i6)v.size() - 1];
  while (v[((i6)v.size() + 1) / 2 - 1] != m) {
    res += 1;
    if (v[((i6)v.size() + 1) / 2 - 1] > m) {
      v.push_front(f);
    } else {
      v.push_back(l);
    }
  };
  cout << res << '\n';
  return 0;
}
