A median in an array with the length of n is an element which occupies position number <image> after we sort the elements in the non-decreasing order (the array elements are numbered starting with 1). A median of an array (2, 6, 1, 2, 3) is the number 2, and a median of array (0, 96, 17, 23) — the number 17.

We define an expression <image> as the integer part of dividing number a by number b.

One day Vasya showed Petya an array consisting of n integers and suggested finding the array's median. Petya didn't even look at the array and said that it equals x. Petya is a very honest boy, so he decided to add several numbers to the given array so that the median of the resulting array would be equal to x.

Petya can add any integers from 1 to 105 to the array, including the same numbers. Of course, he can add nothing to the array. If a number is added multiple times, then we should consider it the number of times it occurs. It is not allowed to delete of change initial numbers of the array. 

While Petya is busy distracting Vasya, your task is to find the minimum number of elements he will need.

Input

The first input line contains two space-separated integers n and x (1 ≤ n ≤ 500, 1 ≤ x ≤ 105) — the initial array's length and the required median's value. The second line contains n space-separated numbers — the initial array. The elements of the array are integers from 1 to 105. The array elements are not necessarily different.

Output

Print the only integer — the minimum number of elements Petya needs to add to the array so that its median equals x.

Examples

Input

3 10
10 20 30


Output

1


Input

3 4
1 2 3


Output

4

Note

In the first sample we can add number 9 to array (10, 20, 30). The resulting array (9, 10, 20, 30) will have a median in position <image>, that is, 10.

In the second sample you should add numbers 4, 5, 5, 5. The resulting array has median equal to 4.
import sys

if __name__ == '__main__':
    #reading input
    total, required_median = [int(n) for n in input().split()]
    numbers = [int(n) for n in input().split()] 
    #---------------

    bigger = 0    #number of nums that are bigger than the given median 
    smaller = 0   #number of nums that are smaller than the given median
    same = 0   #number of nums that are equal to the given median
    found = 0 #flag that shows if expected median was found in initial list. Turns to 1 if found
    numbers_to_add = 0 #result to be output
    
    #iterate through the list of numbers we have
    for num in numbers:
        if num > required_median: 
            bigger += 1
        elif num < required_median:
            smaller += 1
        elif num == required_median:
            same += 1
    
    if same == 0: #if no same was found ... we add one therefore adding it to ...
        numbers_to_add += 1 #... the output
        total += 1 #... and the total number of elements in our list
    else:
        same -= 1 #we remove that element from the number of "same" because this will be our median

    diff = abs(bigger - smaller) #we calculate the difference we have between the number of nums bigger and smaller than median

    if bigger > smaller: #if we have more bigger elements than smaller
        smaller = smaller + min(same, diff) #we will consider the equal elements that we have to be part of the smaller
        same = same - min(same, diff) #we naturally subtract the number we got from the equal
        to_add = (bigger - smaller - 1) #I noticed that if the bigger == smaller - 1 AND the total is even, the solution stands. Since this will require the minimum number of moves we will see if this will give a solution.
        if (total + to_add)%2 == 0: #we check if we add that amount we will get an even total
            numbers_to_add += to_add #we add the number if that's the case
        else:
            numbers_to_add += to_add + 1 #if it's odd we will have to add one more element to what we already wanted to add
    #same logic here
    elif bigger < smaller:
        bigger = bigger + min(same, diff)
        same = same - min(same, diff)
        to_add = (smaller - bigger)
        if (total + to_add) % 2 != 0:
            numbers_to_add += to_add
        else:
            numbers_to_add += to_add - 1
    if numbers_to_add >= 0:
        print(numbers_to_add)
    else:
        print(0)
