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.io.*;
import java.math.BigInteger;
import java.util.*;

// written by luchy0120

public class Main {
    public static void main(String[] args) throws Exception {

        new Main().run();
    }

    static int groups = 0;
    static int[] fa;
    static int[] sz;

    static void init(int n) {
        groups = n;
        fa = new int[n];
        for (int i = 1; i < n; ++i) {
            fa[i] = i;
        }
        sz = new int[n];
        Arrays.fill(sz, 1);
    }

    static int root(int p) {
        while (p != fa[p]) {
            fa[p] = fa[fa[p]];
            p = fa[p];
        }
        return p;
    }

    static void combine(int p, int q) {
        int i = root(p);
        int j = root(q);
        if (i == j) {
            return;
        }
        if (sz[i] < sz[j]) {
            fa[i] = j;
            sz[j] += sz[i];
        } else {
            fa[j] = i;
            sz[i] += sz[j];
        }
        groups--;
    }


    int color[],dfn[],low[],stack[],cnt[];
    boolean vis[];
    boolean iscut[];
    int deep,top,n,m,sum,ans;
    List<Integer> g[];

    void tarjan(int u,int fa) {
        int child = 0;
        dfn[u]=++deep;
        low[u]=deep;
        vis[u]=true;
        stack[++top]=u;
        int sz=g[u].size();
        for(int i=0;i<sz;i++) {
            int v =g[u].get(i);
            if(v==fa) continue;
            if(dfn[v]==0) {
                child++;
                tarjan(v,u);
                low[u]=Math.min(low[u],low[v]);
            } else {
                if(vis[v]) {
                    low[u]=Math.min(low[u],low[v]);
                }
            }
        }
        if(fa<0&&child==1){
            iscut[u] =true;
        }

        if(dfn[u]==low[u]) {
            iscut[u] = true;
            color[u]=++sum;
            vis[u]=false;
            while(stack[top]!=u) {
                color[stack[top]]=sum;
                vis[stack[top--]]=false;
            }
            top--;
        }
    }


    int h[],to[],ne[];int ct =0;
    void add(int u,int v){
        u--;v--;
        to[ct] = v;
        ne[ct] = h[u];
        h[u] = ct++;
    }

    void graph(int n,int m){
        h = new int[n];
        Arrays.fill(h,-1);
        ne = new int[2*m];
        to = new int[2*m];
        ct = 0;
    }


    static long mul(long a, long b, long p)
    {
        long res=0,base=a;
        while(b>0)
        {
            if((b&1L)>0)
                res=(res+base)%p;
            base=(base+base)%p;
            b>>=1;
        }
        return res;
    }


    static long mod_pow(long k,long n,long p){
        long res = 1L;
        long temp = (k%p+p)%p;
        while(n!=0L){
            if((n&1L)==1L){
                res = ((res*temp)%p+p)%p;
            }
            temp = ((temp * temp)%p+p)%p;
            n = n>>1L;
        }
        return res%p;
    }
    public static String roundS(double result, int scale){
        String fmt = String.format("%%.%df", scale);
        return String.format(fmt, result);
    }

    int x[];
    int y[];
    int k ;
    int r = 1000000000;
    int[][] pos;

    boolean gd(int i){
        if(pos[i][0]<pos[i][1]) return false;
        if(pos[i][2]>pos[i][3]) return false;
        return true;
    }


    int area(int i){
        if(pos[i][0]<=pos[i][1]) return 0;
        if(pos[i][2]>=pos[i][3]) return 0;
        return (pos[i][0]-pos[i][1])*(pos[i][3]-pos[i][2]);
    }

    boolean in(int i,int y,int x){
        return y<=pos[i][0]&&y>=pos[i][1] && x<=pos[i][3] && x>= pos[i][2];
    }


    boolean ck(int i,int j){
        return !in(i, pos[j][0],pos[j][3]) &&
        !in(i, pos[j][0],pos[j][2]) &&
        !in(i, pos[j][1],pos[j][2]) &&
        !in(i, pos[j][1],pos[j][3]);
    }

    void go(int c,int sum){
        if(sum>=r) return;
        if(c==n){
            for(int i=0;i<k;++i) {
                if (!gd(i)) return;
            }

            for(int i=0;i<k;++i){
                for(int j=i+1;j<k;++j){
                    if(!ck(i,j)){
                        return;
                    }
                }
            }
            r = sum;
            return;
        }

        for(int i=0;i<k;++i){
            int tmp[] = pos[i].clone();
            int zx = x[c];
            int zy = y[c];

            int prev = area(i);

            pos[i][0] = Math.max(pos[i][0],zy);
            pos[i][1] = Math.min(pos[i][1],zy);

            pos[i][2] = Math.min(pos[i][2],zx);
            pos[i][3] = Math.max(pos[i][3],zx);

            int cur = area(i);

            go(c+1,sum-prev+cur);

            pos[i] = tmp;
        }

    }


    int dx[] = {0,0,1,-1};
    int dy[] = {1,-1,0,0};
    boolean xiao(int mp[][]){
        boolean ok = false;
        boolean mk[][] = new boolean[7][5];
        for(int i=0;i<7;++i){
            for(int j=0;j<5;++j){
                if(mp[i][j]==0) continue;
                int k = j+1;
                int c = mp[i][j];
                while(k<5&&mp[i][k]==c) k++;
                if(k-j>=3){
                    ok = true;
                    for(int u=j;u<k;++u){
                        mk[i][u] = true;
                    }
                }
            }
        }

        for(int i=0;i<5;++i){
            for(int j=6;j>=0;--j){
                if(mp[i][j]==0) break;
                int k = j-1;
                int c = mp[i][j];
                while(k>=0&&mp[i][k]==c) k--;
                if(j-k>=3){
                    ok = true;
                    for(int u=j;u>k;--u){
                        mk[i][u] = true;
                    }
                }
            }
        }

        for(int i=0;i<7;++i) {
            for (int j = 0; j < 5; ++j) {
                if (mp[i][j] > 0 && mk[i][j]) {
                    mp[i][j] = 0;
                }
            }
        }
      return ok;
    }

    void luo(int[][] mp){
        for(int i=0;i<5;++i){
            int f = 6;
            for(int j=6;j>=0;--j){
                if(mp[i][j]==0) continue;
                mp[i][f] = mp[i][j];f--;
                mp[i][j] = 0;
            }
        }
    }


    void go(int mp[][]){
        while(xiao(mp)){
            luo(mp);
        }



    }


    void solve() {
//        int n = ni();
//        int mp[][] = new int[7][5];
//        // less than 10;
//
//        for(int i=0;i<5;++i){
//            int x = 6;
//            while(true){
//                int num = ni();
//                if(num==0) break;
//                mp[x][i] = num;
//                x--;
//            }
//        }
        int n = ni();
        int m = ni();
        long q[] = new long[1000000];
        long d[] = new long[1000000];
        int s = 0; int e = 0;
        Set<Long> st =new HashSet<>();
        for(int i= 0;i<n;++i){
            long x = nl();
            st.add(x);
            q[e++] = x;
        }
        long pt[] = new long[m];
        int g = 0;
        long sum = 0;
        while(s<e){
            long c = q[s];
            long dep = d[s++];
            sum += dep;
            if(s>=n+1) {
                pt[g++] = c;
            }
            if(s==n+m){
                break;
            }
            if(!st.contains(c-1)){
                q[e] = c-1;
                d[e++] = dep+1;
                st.add(c-1);
            }
            if(!st.contains(c+1)){
                q[e] = c+1;
                d[e++] = dep+1;
                st.add(c+1);
            }
        }
        println(sum);
        printArray(pt,0);












    }





    InputStream is;
    PrintWriter out;

    void run() throws Exception {
        is = System.in;
        out = new PrintWriter(System.out);
        solve();
        out.flush();
    }

    private byte[] inbuf = new byte[1024];
    public int lenbuf = 0, ptrbuf = 0;

    private int readByte() {
        if (lenbuf == -1) throw new InputMismatchException();
        if (ptrbuf >= lenbuf) {
            ptrbuf = 0;
            try {
                lenbuf = is.read(inbuf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (lenbuf <= 0) return -1;
        }
        return inbuf[ptrbuf++];
    }

    private boolean isSpaceChar(int c) {
        return !(c >= 33 && c <= 126);
    }

    private int skip() {
        int b;
        while ((b = readByte()) != -1 && isSpaceChar(b)) ;
        return b;
    }

    private double nd() {
        return Double.parseDouble(ns());
    }

    private char nc() {
        return (char) skip();
    }

    private char ncc() {
        int b = readByte();
        return (char) b;
    }

    private String ns() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private char[] ns(int n) {
        char[] buf = new char[n];
        int b = skip(), p = 0;
        while (p < n && !(isSpaceChar(b))) {
            buf[p++] = (char) b;
            b = readByte();
        }
        return n == p ? buf : Arrays.copyOf(buf, p);
    }

    private String nline() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while (!isSpaceChar(b) || b == ' ') {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private char[][] nm(int n, int m) {
        char[][] a = new char[n][];
        for (int i = 0; i < n; i++) a[i] = ns(m);
        return a;
    }

    private int[] na(int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; i++) a[i] = ni();
        return a;
    }

    private long[] nal(int n) {
        long[] a = new long[n];
        for (int i = 0; i < n; i++) a[i] = nl();
        return a;
    }

    private int ni() {
        int num = 0, b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) {
        }
        ;
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        while (true) {
            if (b >= '0' && b <= '9') num = (num << 3) + (num << 1) + (b - '0');
            else return minus ? -num : num;
            b = readByte();
        }
    }

    private long nl() {
        long num = 0;
        int b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) {
        }
        ;
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        while (true) {
            if (b >= '0' && b <= '9') num = num * 10 + (b - '0');
            else return minus ? -num : num;
            b = readByte();
        }
    }

    void print(Object obj) {
        out.print(obj);
    }

    void println(Object obj) {
        out.println(obj);
    }

    void println() {
        out.println();
    }

    void printArray(int a[],int from){
        int l = a.length;
        for(int i=from;i<l;++i){
            print(a[i]);
            if(i!=l-1){
                print(" ");
            }
        }
        println();
    }

    void printArray(long a[],int from){
        int l = a.length;
        for(int i=from;i<l;++i){
            print(a[i]);
            if(i!=l-1){
                print(" ");
            }
        }
        println();
    }
}