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 
#include <bits/stdc++.h>
using namespace std;
long long pw(long long x, long long y) {
  if (y == 0) return 1;
  if (y == 1) return x;
  long long ans = pw(x, y / 2);
  ans = ans * ans;
  if (y % 2 == 1) ans = ans * x;
  return ans;
}
long long pwm(long long x, long long y) {
  if (y == 0) return 1;
  if (y == 1) return x;
  long long ans = pw(x, y / 2) % 10000000000000007;
  ans = (ans * ans) % 10000000000000007;
  if (y % 2 == 1) ans = (ans * x) % 10000000000000007;
  return ans;
}
int check(long long n) {
  if (n < 0)
    return 0;
  else
    return 1;
}
long long add(long long a, long long b) { return a + b; }
long long max(long long a, long long b) {
  if (a > b)
    return a;
  else
    return b;
}
long long min(long long a, long long b) {
  if (a > b)
    return b;
  else
    return a;
}
long long minv(long long a, long long m) {
  long long m0 = m;
  long long y = 0, x = 1;
  if (m == 1) return 0;
  while (a > 1) {
    long long q = a / m, t = m;
    m = a % m, a = t, t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += m0;
  return x;
}
const long long N = 3e6 + 10;
vector<long long> v;
long long a[N];
long long rec[N];
long long lft = -2000000000;
long long rgt = 2000000000;
map<long long, long long> vis;
void solve() {
  long long n, p;
  cin >> n >> p;
  long long a[n + 5];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    vis[a[i]] = 1;
  }
  sort(a, a + n);
  vector<long long> v1, v2;
  for (int i = 0; i < n; i++) {
    if (vis[a[i] - 1] == 0 and a[i] - 1 >= lft) v1.push_back(a[i] - 1);
    if (vis[a[i] + 1] == 0 and a[i] + 1 < rgt) v2.push_back(a[i] + 1);
  }
  vector<long long> ans;
  long long s1 = v1.size();
  long long s2 = v2.size();
  long long i = 0, j = s2;
  for (int k = 0; k < p; k++) {
    if (i < s1) {
      if (vis[v1[i]] == 0 and v1[i] >= lft) {
        ans.push_back(v1[i]);
        vis[v1[i]] = 1;
        v1[i]--;
        i++;
      } else {
        auto it = v1.begin();
        it += i;
        v1.erase(it);
        k--;
        s1--;
      }
      continue;
    }
    if (i == s1 and j == s2) {
      j = 0;
    }
    if (j < s2) {
      if (vis[v2[j]] == 0 and v1[j] <= rgt) {
        ans.push_back(v2[j]);
        vis[v2[j]] = 1;
        v2[j]++;
        j++;
      } else {
        auto it = v2.begin();
        it += j;
        v2.erase(it);
        k--;
        s2--;
      }
    }
    if (j == s2 and i == s1) i = 0;
  }
  long long s3 = ans.size();
  vector<pair<long long, long long> > ans1;
  for (int i = 0; i < n; i++) {
    ans1.push_back(make_pair(a[i], 0));
  }
  for (int i = 0; i < s3; i++) {
    ans1.push_back(make_pair(ans[i], 10000000000000007));
  }
  sort(ans1.begin(), ans1.end());
  long long s4 = ans1.size();
  long long sm = 0;
  long long mt = 10000000000000007;
  for (int i = 0; i < s4; i++) {
    if (ans1[i].second == 0) {
      j = i - 1;
      while (j >= 0 and ans1[j].second != 0) {
        ans1[j].second =
            min(ans1[j].second, abs(ans1[j].first - ans1[i].first));
        j--;
      }
      mt = ans1[i].first;
    } else {
      ans1[i].second = min(ans1[i].second, abs(ans1[i].first - mt));
    }
  }
  for (int i = 0; i < s4; i++) {
    if (ans1[i].second != 0) {
      sm += (ans1[i].second);
    }
  }
  cout << sm << endl;
  for (int i = 0; i < s3; i++) cout << ans[i] << " ";
  cout << endl;
}
bool checkValidity(int a, int b, int c) {
  if (a + b < c - 1 || a + c < b - 1 || b + c < a - 1)
    return false;
  else
    return true;
}
int main() {
  int t;
  t = 1;
  while (t--) {
    if (checkValidity(2, 2, 2)) solve();
  }
  return 0;
}
