#include <iostream>
#include <bits/stdc++.h>
#include <algorithm>
#include <math,h>
using namespace std;

int main()
{
    int N;
    int x;
    cin >> N >> x;
    float n = N;
    int A[200050];
    for(int i = 1; i <= N; i++)
    cin >> A[i];
    sort(A, A + (N + 1));
    int ans = 0;
    if(A[ceil(n / 2)]) = x)
    {
        cout << 0;
    }
    else if(A[ceil(n / 2)]) > x)
    {
        while(A[ceil(n / 2)]) != x)
        {
            x++;
            ans++;
        }
        cout << ans;
    }
    else if(A[ceil(n / 2)]) < x)
    {
        while(A[ceil(n / 2)]) != x)
        {
            x--;
            ans++;
        }
        cout << ans;
    }
    
    
    
}