#include <iostream>
#include <algorithm>
int binarySearch(int arr[], int x, int high, int *p) {
    int mid, low = 0; *p = high;
    while(low <= high) {
        mid = (low + high)/2;
        if (x == arr[mid])
            return mid;
        else if (x > arr[mid])
            low = mid + 1;
        else
            high = mid - 1;
    }
    if(*p % 2 !=0)
        *p = *p + 1;
    else
        *p = *p - 1;
    return low;
}
int main() {
    int N, Q, i, r, j, p = 0, res = 0;
    std::cin >> N >> Q;
    int a[N], b;
    for(i = 0; i < N; i++) {
        std::cin >> a[i];
    }
    std::sort(a, a+N);
    std::cin >> b;
    r = binarySearch(a, b, N,&p);
    N = p;
    res = abs(N/2 - r);
    if(r < N/2)
        res++;
    std::cout << res;
}