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

import java.io.*;
import java.util.*;

public class Q1 {
	private void solve(Scan scan, Print print) throws Exception {
		int N = scan.nextInt();
		long S=scan.nextLong();
		long arr[] = new long[N];
		scan.next(arr);
		shuffle(arr);
		Arrays.parallelSort(arr);
		long ans=0;
		if(arr[N/2]==S)
		{
			
		}
		else if(S<arr[N/2])
		{
			for(int i=0;i<=N/2;i++)
			{
				if(arr[i]>S)
				{
					ans+=arr[i]-S;
				}
			}
		}
		else
		{
			for(int i=N/2;i<N;i++)
			{
				if(arr[i]<S)
				{
					ans+=S-arr[i];
				}
				else
				{
					break;
				}
			}
		}
		print.println(ans);
	}

	public static void main(String args[]) throws Exception {
		Scan scan = new Scan();
		Print print = new Print();
		Q1 o = new Q1();
		o.solve(scan, print);
		print.close();
	}

	private void shuffle(int arr[]) {
		Random random = new Random();
		int temp = 0;
		for (int i = 0; i < arr.length; i++) {
			int j = random.nextInt(arr.length);
			temp = arr[j];
			arr[j] = arr[i];
			arr[i] = temp;
		}
	}

	private void shuffle(long arr[]) {
		Random random = new Random();
		long temp = 0;
		for (int i = 0; i < arr.length; i++) {
			int j = random.nextInt(arr.length);
			temp = arr[j];
			arr[j] = arr[i];
			arr[i] = temp;
		}
	}

	public static class Print {
		private final BufferedWriter bw;

		public Print() {
			this.bw = new BufferedWriter(new OutputStreamWriter(System.out));
		}

		public void print(Object object) throws IOException {
			bw.append("" + object);
		}

		public void println(Object object) throws IOException {
			print(object);
			bw.append("\n");
		}

		public void println(int object[]) throws IOException {
			print(Arrays.toString(object));
			bw.append("\n");
		}

		public void print(int object[]) throws IOException {
			print(Arrays.toString(object));
		}

		public void println(long object[]) throws IOException {
			print(Arrays.toString(object));
			bw.append("\n");
		}

		public void print(long object[]) throws IOException {
			print(Arrays.toString(object));
		}

		public void println(boolean object[]) throws IOException {
			print(Arrays.toString(object));
			bw.append("\n");
		}

		public void print(boolean object[]) throws IOException {
			print(Arrays.toString(object));
		}

		public void println(Object object[]) throws IOException {
			print(Arrays.deepToString(object));
			bw.append("\n");
		}

		public void print(Object object[]) throws IOException {
			print(Arrays.deepToString(object));
		}

		public void close() throws IOException {
			bw.close();
		}
	}

	static class Scan {
		private byte[] buf = new byte[1024 * 1024 * 4];
		private int index;
		private InputStream in;
		private int total;

		public Scan() {
			in = System.in;
		}

		public int scan() throws IOException {
			if (total < 0)
				throw new InputMismatchException();
			if (index >= total) {
				index = 0;
				total = in.read(buf);
				if (total <= 0)
					return -1;
			}
			return buf[index++];
		}

		public int nextInt() throws IOException {
			int integer = 0;
			int n = scan();
			while (isWhiteSpace(n))
				n = scan();
			int neg = 1;
			if (n == '-') {
				neg = -1;
				n = scan();
			}
			while (!isWhiteSpace(n)) {
				if (n >= '0' && n <= '9') {
					integer *= 10;
					integer += n - '0';
					n = scan();
				} else
					throw new InputMismatchException();
			}
			return neg * integer;
		}

		public double nextDouble() throws IOException {
			double doub = 0;
			int n = scan();
			while (isWhiteSpace(n))
				n = scan();
			int neg = 1;
			if (n == '-') {
				neg = -1;
				n = scan();
			}
			while (!isWhiteSpace(n) && n != '.') {
				if (n >= '0' && n <= '9') {
					doub *= 10;
					doub += n - '0';
					n = scan();
				} else
					throw new InputMismatchException();
			}
			if (n == '.') {
				n = scan();
				double temp = 1;
				while (!isWhiteSpace(n)) {
					if (n >= '0' && n <= '9') {
						temp /= 10;
						doub += (n - '0') * temp;
						n = scan();
					} else
						throw new InputMismatchException();
				}
			}
			return doub * neg;
		}

		public long nextLong() throws IOException {
			long ret = 0;
			long c = scan();
			while (c <= ' ') {
				c = scan();
			}

			boolean neg = (c == '-');
			if (neg) {
				c = scan();
			}

			do {
				ret = ret * 10 + c - '0';
			} while ((c = scan()) >= '0' && c <= '9');

			if (neg) {
				return -ret;
			}
			return ret;
		}

		public String next() throws IOException {
			StringBuilder sb = new StringBuilder();
			int n = scan();
			while (isWhiteSpace(n))
				n = scan();
			while (!isWhiteSpace(n) || n == ' ') {
				sb.append((char) n);
				n = scan();
			}
			return sb.toString();
		}

		public void next(int arr[]) throws IOException {
			for (int i = 0; i < arr.length; i++) {
				arr[i] = nextInt();
			}
		}

		public void next(long arr[]) throws IOException {
			for (int i = 0; i < arr.length; i++) {
				arr[i] = nextLong();
			}
		}

		public char[] next(char c) throws IOException {
			char arr[] = next().toCharArray();
			return arr;
		}

		private boolean isWhiteSpace(int n) {
			if (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1)
				return true;
			return false;
		}
	}
}