You are given an array a of n integers and an integer s. It is guaranteed that n is odd.

In one operation you can either increase or decrease any single element by one. Calculate the minimum number of operations required to make the median of the array being equal to s.

The median of the array with odd length is the value of the element which is located on the middle position after the array is sorted. For example, the median of the array 6, 5, 8 is equal to 6, since if we sort this array we will get 5, 6, 8, and 6 is located on the middle position.

Input

The first line contains two integers n and s (1≤ n≤ 2⋅ 10^5-1, 1≤ s≤ 10^9) — the length of the array and the required value of median.

The second line contains n integers a_1, a_2, …, a_n (1≤ a_i ≤ 10^9) — the elements of the array a.

It is guaranteed that n is odd.

Output

In a single line output the minimum number of operations to make the median being equal to s.

Examples

Input

3 8
6 5 8


Output

2

Input

7 20
21 15 12 11 20 19 12


Output

6

Note

In the first sample, 6 can be increased twice. The array will transform to 8, 5, 8, which becomes 5, 8, 8 after sorting, hence the median is equal to 8.

In the second sample, 19 can be increased once and 15 can be increased five times. The array will become equal to 21, 20, 12, 11, 20, 20, 12. If we sort this array we get 11, 12, 12, 20, 20, 20, 21, this way the median is 20.
3 1
1 2 5
 1 1
100000
 5 1
2 2 4 6 1
 3 10
5 5 10
 1 1
1
 3 4
1 2 5
 1 100
88
 1 100
105

1
 99999
 2
 5
 0
 2
 12
 5

from sys import stdin, stdout 
from bisect import bisect_left, bisect_right
from collections import defaultdict
import math
from fractions import Fraction as frac
from random import random
cin = stdin.readline
def cout(x):
	stdout.write(str(x)+'\n')
def var(type = int):
    return type(stdin.readline())
def readline(type = int):
    return map(type,stdin.readline().split())
def readlist(type = int):
    return list(map(type,stdin.readline().split()))
def sorted_indexes(arr):
    return sorted(range(len(arr)),key=arr.__getitem__)
def printr(arr):
    [stdout.write(str(x)+' ')   for x in arr]
    cout('')
def find_lt(a, x):#'Find rightmost value less than x'
    i = bisect_left(a, x)
    if i:
        return a[i-1]
    raise ValueError
def find_gt(a, x):#'Find leftmost value greater than x'
    i = bisect_right(a, x)
    if i != len(a):
        return a[i]
    raise ValueError
def dist(x,y):
    return math.sqrt(x*x + y*y)
def binary_search(arr, x):
    i = bisect_left(arr, x)
    if i == len(arr) or arr[i] != x:
        return -1
    return i

# ---------------------Template ends-------------sdpt,sdpt131[Sudipta Banik]---------------------

# mp = [0]*201
# ops = [0]*201
# def go(arr,i,j ,dp):
#     if i==j and ops[i] is None:
#         return [mp[i],mp[i]]
#     if i>j:
#         return [0,0]
#     if dp[i][j]:
#         return dp[i][j]
#     mx = -1000000000
#     mn = 1000000000
#     for k in range(i+1,j,2):
#         if ops[k]:
#             left = go(arr,i,k-1,dp)
#             right = go(arr,k+1,j,dp)
#             mx = max(mx,left[0] + right[0])
#             mn = min(mn,left[1] + right[1])
#         else:
#             left = go(arr,i,k-1,dp)
#             right = go(arr,k+1,j,dp)
#             mx = max(mx,left[0] - right[1])
#             mn = min(mn,left[1] - right[0])
#     dp[i][j] = [mx,mn]
#     return [mx,mn]

    

n , s = readline(int)

arr = readlist(int)

arr.sort()

count = 0

j = n//2

if arr[j] < s:
    for i in range(j,n):
        if arr[i] < s:
            count += (s-arr[i])
        else:
            break

    print(count)

else:
    for i in range(j,-1,-1):
        if arr[i] > s:
            count += arr[i]-s
        else:
            break
    print(count)




    









# # def tobit(s):
# #     x = []
# #     for _ in range(3):
# #         x.append(s%2)
# #         s//=2
# #     return x

# def power(x, y, p) :
#     res = 1
#     x = x % p 
#     while (y > 0) :
#         if ((y & 1) == 1) :
#             res = (res * x) % p
#         y = y >> 1
#         x = (x * x) % p
#     return res




# def setCount(x):
#     return bin(x).count('1')

# for _ in range(var()):
    
#     a,b,n = readline()
#     p = 1000000007  
#     diff = abs(a-b)
#     mod  = power(a,n,p)
#     mod += power(b,n,p)
#     print(math.gcd(mod,diff)%p)
    
    
#     # n = var()
#     # # print(bin(n))
#     # if setCount(n)==2:
#     #     print(0)
#     # elif setCount(n)==1:
#     #     if n == 1:
#     #         print(2)
#     #     else:
#     #         print(1)
#     # elif setCount(n)==0:
#     #     print(3)
#     # else:
#     #     lo = n-1
#     #     hi = n+1
#     #     while(lo >= 3):
#     #         if(setCount(lo)==2):
#     #             break
#     #         lo -=1
#     #     while(hi <= 1000):
#     #         if(setCount(hi)==2):
#     #             break
#     #         hi +=1
        
#     #     if (hi - n) < (n - lo):
#     #         print(hi-n)
#     #     else:
#     #         print(n-lo)
        
    





# #     s = cin()
# #     t = cin()
# #     flg = False
# #     for el in range(8):
# #         bits = tobit(el)
# #         ch = []
# #         # printr(bits)
# #         for i in range(3):
# #             if bits[i]==0:
# #                 ch.append(s[i])
# #             else:
# #                 ch.append(t[i])
# #         ch.sort()
# #         if (''.join(ch) == 'bbo'):
# #             flg = True
# #             break
# #     if flg:
# #         print("yes")
# #     else:
# #         print("no")
