#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[100000], b[100000], k, c1, c2;
  cin >> n >> k;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
    b[n - i + 1] = a[i];
  }
  n++;
  int n1 = n;
  int n2 = n;
  sort(a + 1, a + n1);
  if (a[(n) / 2] == k) {
    cout << 0;
    return 0;
  }
  for (int i = 1; i < 1000; ++i) {
    a[n1] = k;
    n1++;
    sort(a + 1, a + n1);
    if (a[(n1) / 2] == k) {
      c1 = i;
      i = 1001;
      for (int i1 = 1; i1 < 1000; ++i1) {
        b[n2] = 1;
        n2++;
        sort(b + 1, b + n2);
        if (b[(n2) / 2] == k) {
          c2 = i1;
          cout << min(c1, c2);
          return 0;
        }
      }
    }
  }
  cout << c1;
}
