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

//Author: Mo Abjal, MJP Rohilkhand University Bareilly, UP, India 2018.
// NSR - E-Card
import java.util.*;
import java.io.*;
import java.text.*;
import java.math.*;
public class Main{
	public static StringTokenizer token = new StringTokenizer("");
	public static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	public static PrintWriter output = new PrintWriter(System.out);
	public static void main(String[] args) throws Exception {		
		int N = ni();
		int K = ni();
		Integer A[] = ai(N);
		Arrays.sort(A);
		//for(int i=0;i<N;i++) output.print(A[i]+" "); output.println();
		int count = Math.abs(K-A[N/2]);
		for(int i=N/2+1;i<N;i++){
			if(A[i]<K) count = count + K-A[i];
			if(A[N-i-1]>K) count = count + A[N-N/2-1]-K;
		}
		output.println(count);
		output.close();
		/*char A[] = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
		int N = ni();
		String data = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
		String digit = "0123456789";
		StringBuilder sb = new StringBuilder("");
		StringBuilder temp = new StringBuilder("");		
		StringBuilder col = new StringBuilder("");
		boolean flag = true;		
		for(int i=0;i<N;i++){
			sb = sb.append(ns());
			for(int j=0;j<sb.length();j++){
				if(data.contains(Character.toString(sb.charAt(j))) && flag==true){
					temp.append(Character.toString(sb.charAt(j)));
				}
				else{
					flag = false;
					
				}
			}
		}*/
	}
	//Scanning Inputs and Converting data library
	//Parse Integer
	public static Integer pi(String str){
		return Integer.parseInt(str);
	}
	//Parse Long
	public static Long pl(String str){
		return Long.parseLong(str);
	}
	//Converting Integer into String
	public static String ps(Integer N){
		return Integer.toString(N);
	}
	//Taking Integer Input
	public static Integer ni() throws IOException{
		if(!token.hasMoreElements()){
			token = new StringTokenizer(br.readLine());
		}
		return Integer.parseInt(token.nextToken());
	}
	//Taking Long Input
	public static Long nl() throws IOException{
		if(!token.hasMoreElements()){
			token = new StringTokenizer(br.readLine());
		}
		return Long.parseLong(token.nextToken());
	}
	//Taking String Input
	public static String ns() throws IOException{
		return new StringTokenizer(br.readLine()).nextToken();
	}
	//Taking Integer Array
	public static Integer[] ai(int N) throws IOException{
		Integer A[] = new Integer[N];
		token = new StringTokenizer(br.readLine());
		for(int i=0;i<A.length;i++){
			A[i] = pi(token.nextToken());
		}
		return A;
	}
	//Taking Long Array
	public static long[] al(int N) throws IOException{
		long A[] = new long[N];
		token = new StringTokenizer(br.readLine());
		for(int i=0;i<N;i++){
			A[i] = Long.parseLong(token.nextToken());
		}
		return A;
	}
	//Taking 2D Char Array
	public static char[][] acc(int N,int M) throws IOException{
		char C[][] = new char[N][M];
		for(int i=0;i<N;i++){
			token = new StringTokenizer(br.readLine());
			String s = token.nextToken();
			for(int j=0;j<M;j++){
				C[i][j] = s.charAt(j);
			}
		}
		return C;
	}
	//Taking String Array
	public static String[] as(int N) throws IOException{
		String S[] = new String[N];
		token = new StringTokenizer(br.readLine());
		for(int i=0;i<S.length;i++){
			S[i] = token.nextToken();
		}
		return S;
	}

	//Calculating factorial
	public static long fact(long N){
		long fact = 1;
		for(int i=1;i<=N;i++){
			fact = fact * i;
		}
		return fact;
	}
	public static BigInteger factB(int N){
		BigInteger b = new BigInteger("1");
		for(int i=1;i<=N;i++){
			b = b.multiply(BigInteger.valueOf(i));
		}
		return b;
	}
	//Making Paares of given size
	public static long mp(long N,long size){
		long mul=1;
		long temp = N;
		for(long i=N;i>N-size;i--){
			mul = mul*temp--;
		}
		long fact = fact(size);
		if(mul/fact==0) return 1;
		return mul/fact;
	}
	public static long sod(long N){
		long sum = 0;
		while(N>0){
			long x = N%10;
			sum = sum + x;
			N = N/10;
		}
		return sum;
	}
}



//Copyright Reserved - Mo Abjal.