#include <bits/stdc++.h>
using namespace std;
int n, x, c1 = 0, c2 = 0, c3 = 0;
int main() {
  scanf("%d %d", &n, &x);
  for (int i = 1; i <= n; i++) {
    int y;
    scanf("%d", &y);
    if (y < x) c1++;
    if (y == x) c2++;
    if (y > x) c3++;
  }
  if (c3 > c1 + c2)
    printf("%d\n", c3 - c1 - c2);
  else if (c1 >= c2 + c3)
    printf("%d\n", c1 - c3 - c2 + 1);
  else
    printf("0\n");
  return 0;
}
