There are n Christmas trees on an infinite number line. The i-th tree grows at the position x_i. All x_i are guaranteed to be distinct.

Each integer point can be either occupied by the Christmas tree, by the human or not occupied at all. Non-integer points cannot be occupied by anything.

There are m people who want to celebrate Christmas. Let y_1, y_2, ..., y_m be the positions of people (note that all values x_1, x_2, ..., x_n, y_1, y_2, ..., y_m should be distinct and all y_j should be integer). You want to find such an arrangement of people that the value ∑_{j=1}^{m}min_{i=1}^{n}|x_i - y_j| is the minimum possible (in other words, the sum of distances to the nearest Christmas tree for all people should be minimized).

In other words, let d_j be the distance from the j-th human to the nearest Christmas tree (d_j = min_{i=1}^{n} |y_j - x_i|). Then you need to choose such positions y_1, y_2, ..., y_m that ∑_{j=1}^{m} d_j is the minimum possible.

Input

The first line of the input contains two integers n and m (1 ≤ n, m ≤ 2 ⋅ 10^5) — the number of Christmas trees and the number of people.

The second line of the input contains n integers x_1, x_2, ..., x_n (-10^9 ≤ x_i ≤ 10^9), where x_i is the position of the i-th Christmas tree. It is guaranteed that all x_i are distinct.

Output

In the first line print one integer res — the minimum possible value of ∑_{j=1}^{m}min_{i=1}^{n}|x_i - y_j| (in other words, the sum of distances to the nearest Christmas tree for all people).

In the second line print m integers y_1, y_2, ..., y_m (-2 ⋅ 10^9 ≤ y_j ≤ 2 ⋅ 10^9), where y_j is the position of the j-th human. All y_j should be distinct and all values x_1, x_2, ..., x_n, y_1, y_2, ..., y_m should be distinct.

If there are multiple answers, print any of them.

Examples

Input


2 6
1 5


Output


8
-1 2 6 4 0 3 


Input


3 5
0 3 1


Output


7
5 -2 4 -1 2 
import java.util.*;
import java.io.*;;

public class E {

	static ArrayList<Integer> primes; // generated by sieve

	/*
	 * 1. Generating a list of prime factors of N
	 */
	static ArrayList<Long> primeFactors(long N) // O(sqrt(N) / ln sqrt(N))
	{
		ArrayList<Long> factors = new ArrayList<Long>(); // take abs(N) in case of -ve integers
		int idx = 0, p = primes.get(idx);

		while (p * 1l * p <= N) {
			if (N % p == 0)
				factors.add((long) p);
			while (N % p == 0) {
				N /= p;
			}
			p = primes.get(++idx);
		}

		if (N != 1) // last prime factor may be > sqrt(N)
			factors.add(N); // for integers whose largest prime factor has a power of 1
		return factors;
	}

	static int[] isComposite;

	static void sieve(int N) // O(N log log N)
	{
		isComposite = new int[N + 1];
		isComposite[0] = isComposite[1] = 1; // 0 indicates a prime number
		primes = new ArrayList<Integer>();

		for (int i = 2; i <= N; ++i) // can loop till i*i <= N if primes array is not needed O(N log log sqrt(N))
			if (isComposite[i] == 0) // can loop in 2 and odd integers for slightly better performance
			{
				primes.add(i);
				if (1l * i * i <= N)
					for (int j = i * i; j <= N; j += i) // j = i * 2 will not affect performance too much, may alter in
														// modified sieve
						isComposite[j] = 1;
			}
	}

	static ArrayList<Integer>[] adjList;
	static int V, counter, SCC, dfs_num[], dfs_low[];
	static boolean[] inSCC;
	static Stack<Integer> stack;
	static int[] cost;
	static long ans;
	static long r;

	static void tarjanSCC() // O(V + E)
	{
		for (int i = 0; i < V; ++i)
			if (dfs_num[i] == 0)
				tarjanSCC(i);
	}

	static void tarjanSCC(int u) {
		dfs_num[u] = dfs_low[u] = ++counter;
		stack.push(u);

		for (int v : adjList[u]) {
			if (dfs_num[v] == 0)
				tarjanSCC(v);
			if (!inSCC[v])
				dfs_low[u] = Math.min(dfs_low[u], dfs_low[v]);
		}
		if (dfs_num[u] == dfs_low[u]) {
			// SCC found
			SCC++;
			int c = 0;
			int min = 1000000000;

			while (true) {
				int v = stack.pop();
				if (min > cost[v]) {
					c = 1;
					min = cost[v];
				} else if (min == cost[v])
					c++;
				inSCC[v] = true;
				if (v == u)
					break;
			}
			r = r + min;
			ans = (ans * 1l * c) % 1000000007;
		}
	}

	
	static ArrayList<Integer> arr;
	static int n;
	static int m;
	static int k1;
	static int k2;
	static long[][][][] memo;

	static long dp(int idx, int t, int c, int l) {
		if (idx == n + m) {
			return 1;
		}
		if (t == n) {
			if (n + m - idx > k2)
				return 0;
			else
				return 1;
		}
		if (idx - t == m) {
			if (n - t > k1)
				return 0;
			else
				return 1;
		}
		if (memo[idx][t][c][l] != -1)
			return memo[idx][t][c][l];
		long max = 0;
		if (l == 0) {
			if (c == k1)
				max += dp(idx + 1, t, 1, 1);
			else {
				max += (dp(idx + 1, t + 1, c + 1, l) + dp(idx + 1, t, 1, 1)) % 100000000;
			}
		} else {
			if (c == k2)
				max += dp(idx + 1, t + 1, 1, 0);
			else {
				max += (dp(idx + 1, t, c + 1, l) + dp(idx + 1, t + 1, 1, 0)) % 100000000;
			}
		}
		return memo[idx][t][c][l] = max;
	}

	static long[] cum;

	static int bin() {
		int s = 0;
		int e = 100000*2;
		int ans = -1;
		while (s <= e) {
			int mid = (s + e) / 2;
			if (check(mid)) {
				ans = mid;
				e = mid -1;
			} else
				s = mid + 1;
		}
		return ans;
	}
	static boolean check(int x) {
		int r=0;
		r+=Math.min(a[0]+1000000000*2, x)+Math.min(a[1]-a[0], x);
		for (int i = 1; i < a.length-1; i++) {
			r+=Math.min(a[i]-a[i-1], x)+Math.min(a[i+1]-a[i], x);
		}
		r+=Math.min(1000000000*2-a[a.length-1], x)+Math.min(a[a.length-1]-a[a.length-2], x);
//		System.out.println(r);
		return r>=m;
	}
	static Integer[] a;
	

	
	public static void main(String[] args) throws NumberFormatException, IOException, InterruptedException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);
		StringTokenizer st = new StringTokenizer(br.readLine());

		int n = Integer.parseInt(st.nextToken());
		m = Integer.parseInt(st.nextToken());
		st = new StringTokenizer(br.readLine());
		HashSet<Integer> h=new HashSet<>();
		a = new Integer[n];
		for (int i = 0; i < n; i++) {
			a[i] = Integer.parseInt(st.nextToken());
			h.add(a[i]);
		}
		Arrays.sort(a);
		Queue<Integer> q=new LinkedList<Integer>();
		for (int i = 0; i < a.length; i++) {
			q.add(a[i]);
		}
		if(n==1) {
			long d=0;
			int s=a[0]-(m+1)/2;
			ArrayList<Integer> r=new ArrayList<>();
			if(-2*1000000000 > a[0]-(m+1)/2) {
//				System.out.println(3846);
				s=-2*1000000000;
				for (int i = 0; i < m;) {
					System.out.println(3846);
					if(s==a[0])
						s++;
					else {
						r.add(s);
						d+=Math.abs(a[0]-s);
						s++;
						i++;
					}
				}
				pw.println(d);
				for(int x:r)
					pw.print(x+" ");
			}
			else {
				int e=a[0]+(m+1)/2;
				for (int i = 0; i < m;) {
//					System.out.println(3846);
					if(e==a[0]) {
						e--;
					}
					else {
						r.add(e);
						d+=Math.abs(a[0]-e);
						e--;
						i++;
					}
				}
				pw.println(d);
				for(int x:r)
					pw.print(x+" ");
			}
		}
		else {
			ArrayList<Integer> r=new ArrayList<>();
			boolean f=true;
			long d=0;
			int x=1;
			for (int i = 0; i < m ; ) {
				int size=q.size();
				for (int j=0;j<size;j++) {
					int l=q.poll();
					boolean g=false;
					if(l-x >=-2*1000000000 && !h.contains(l-x)) {
						d+=x;
						h.add(l-x);
						r.add(l-x);
						i++;
						if(i==m) {
							break;
						}
						q.add(l);
						g=true;
					}
					if(l+x<=2*1000000000 && !h.contains(l+x)) {
						d+=x;
						h.add(l+x);
						r.add(l+x);
						i++;
						if(i==m) {
							break;
						}
						if(!g)
							q.add(l);
					}
				}
				x++;
			}
			pw.println(d);
			for(int w:r)
				pw.print(w+" ");
		}
		


//
//		long d = 0;
//		int l = -1000000000 * 2-1;
//		for (int i = 0; i < m;) {
//			triple p = q.poll();
//			if (l != p.x - 1) {
//				d += p.y - p.x + 1;
//				p.x--;
//				i++;
//			}
//			if(!q.isEmpty()) {
//				if(p.z+1==q.peek().x) {
//					triple y=q.poll();
//					if(!q.isEmpty()) {
//						if(y.z+1==q.peek().x)
//							;
//						else
//					}
//				}
//				else {
//					
//				}
//			}
//			else if(p.z !=1000000000 * 2){
//				d+=p.z+1-p.y;
//				p.z++;
//				i++;
//			}
//		}

		
		pw.flush();
		pw.close();

	}

	static long dis(int x, int y, int z, int w) {
		return (x - z) * (x - z) + (y - w) * (y - w);
	}

	static int gcd(int a, int b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

	static class pair implements Comparable<pair> {
		int x;
		int y;

		public pair(int d, int u) {
			x = d;
			y = u;
		}

		@Override
		public int compareTo(pair o) {
			// TODO Auto-generated method stub
			if (x == o.x)
				return y - o.y;
			return x - o.x;
		}

	}

	static class triple implements Comparable<triple> {
		int x;
		int y;
		int z;

		public triple(int a, int b, int c) {
			x = a;
			y = b;
			z = c;
		}

		@Override
		public int compareTo(triple o) {
			// TODO Auto-generated method stub
			return y - o.y;
		}
	}
}
