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 Main {
    public static void main(String[] args) throws Exception {
        FastScanner sc = new FastScanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        StringBuilder sb = new StringBuilder();
        int n = sc.nextInt();
        int m = sc.nextInt();
        long[] tree = sc.nextLongArray(n);
        //Arrays.sort(tree);
        GeekInteger.save_sort(tree);
        long[] left = tree.clone();
        long[] right = tree.clone();
        Deque<Point> q = new ArrayDeque<Point>();
        for(int i = 0; i < n; i++){
            q.add(new Point(tree[i],1L,i));
        }
        long ans = 0;
        while(q.size() > 0){
            Point p = q.poll();
            int i = p.i;
            long x = p.x;
            long s = p.s;
            long min = x-s;
            boolean flg = false;
            if(i == 0 || right[i-1] < min){
                flg = true;
                left[i] = min;
                ans += s;
                m--;
                if(m == 0){
                    sb.append(min);
                    break;
                }else{
                    sb.append(min + " ");
                }
            }
            long max = x+s;
            if(i == n-1 || left[i+1] > max){
                flg = true;
                right[i] = max;
                ans += s;
                m--;
                if(m == 0){
                    sb.append(max);
                    break;
                }else{
                    sb.append(max + " ");
                }
            }
            if(flg) q.add(new Point(x,s+1,i));
        }
        pw.println(ans);
        pw.println(sb.toString());
        pw.flush();
    }

    static class GeekInteger {
        public static void save_sort(long[] array) {
            shuffle(array);
            Arrays.sort(array);
        }
 
        public static long[] shuffle(long[] array) {
            int n = array.length;
            Random random = new Random();
            for (int i = 0, j; i < n; i++) {
                j = i + random.nextInt(n - i);
                long randomElement = array[j];
                array[j] = array[i];
                array[i] = randomElement;
            }
            return array;
        }
 
    }
}

class Point{
    long x, s;
    int i;
    public Point(long x, long s, int i){
        this.x = x;
        this.s = s;
        this.i = i;
    }
}
class FastScanner {
    private BufferedReader reader = null;
    private StringTokenizer tokenizer = null;
    public FastScanner(InputStream in) {
        reader = new BufferedReader(new InputStreamReader(in));
        tokenizer = null;
    }

    public String next() {
        if (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public String nextLine() {
        if (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                return reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken("\n");
    }

    public long nextLong() {
        return Long.parseLong(next());
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public double nextDouble() {
         return Double.parseDouble(next());
    }
    
    public String[] nextArray(int n) {
        String[] a = new String[n];
        for (int i = 0; i < n; i++)
            a[i] = next();
        return a;
    }

    public int[] nextIntArray(int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; i++)
            a[i] = nextInt();
        return a;
    }

    public long[] nextLongArray(int n) {
        long[] a = new long[n];
        for (int i = 0; i < n; i++)
            a[i] = nextLong();
        return a;
    } 
}
