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;
inline long long gcd(long long a, long long b) {
  while (b != 0) {
    long long c = a % b;
    a = b;
    b = c;
  }
  return a < 0 ? -a : a;
}
inline long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
inline long long lowbit(long long x) { return x & (-x); }
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const long long mod = 998244353;
inline long long rd() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 3) + (x << 1) + (ch ^ 48);
    ch = getchar();
  }
  return x * f;
}
const double eps = 1e-8;
const int M = 4e6 + 10;
const int N = 1e6 + 10;
int a[N];
vector<int> mp[N];
int n, m;
bool check(int x) {
  int ma = -inf;
  int sum = 0;
  for (int i = 1; i <= n; i++) {
    sum += min(a[i] - ma - 1, x);
    sum += min(a[i + 1] - a[i] - 1, x);
    ma = min(a[i + 1] - 1, a[i] + x);
    if (sum >= m) return 1;
  }
  return 0;
}
int main() {
  n = rd(), m = rd();
  for (int i = 1; i <= n; i++) a[i] = rd();
  sort(a + 1, a + 1 + n);
  a[0] = -inf;
  a[n + 1] = inf;
  int l = 1, r = m;
  while (l < r) {
    int mid = (l + r) >> 1;
    if (check(mid))
      r = mid;
    else
      l = mid + 1;
  }
  int dis = l - 1;
  long long ans = 0;
  int ma = -inf;
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = max(ma + 1, a[i] - dis); j <= a[i] - 1; j++)
      ans += abs(j - a[i]), cnt++, mp[i].push_back(j);
    for (int j = a[i] + 1; j <= min(a[i + 1] - 1, a[i] + dis); j++)
      ans += min(abs(j - a[i]), abs(j - a[i + 1])), cnt++, mp[i].push_back(j);
    ma = min(a[i + 1] - 1, a[i] + dis);
  }
  ans += ((long long)m - cnt) * ((long long)dis + 1);
  int res = m - cnt;
  for (int i = 1; i <= n; i++) {
    int x, l, r, y;
    if (mp[i - 1].size())
      x = max(a[i - 1], mp[i - 1][mp[i - 1].size() - 1]);
    else
      x = a[i - 1];
    if (mp[i].size())
      l = min(mp[i][0] - 1, a[i] - 1),
      r = max(mp[i][mp[i].size() - 1] + 1, a[i] + 1);
    else
      l = a[i] - 1, r = a[i] + 1;
    if (mp[i + 1].size())
      y = min(a[i + 1], mp[i + 1][0]);
    else
      y = a[i + 1];
    if (l > x) res--, mp[i - 1].push_back(l);
    if (res == 0) break;
    if (r < y) res--, mp[i].push_back(r);
    if (res == 0) break;
  }
  printf("%lld\n", ans);
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j < mp[i].size(); j++) {
      printf("%d ", mp[i][j]);
    }
  }
  printf("\n");
}
