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;
template <class T>
int check_mod(T a, T b) {
  return (a % b) ? 1 : 0;
}
template <class T>
void maxi(T &a, T b) {
  a = max(a, b);
  return;
}
template <class T>
void mini(T &a, T b) {
  a = min(a, b);
  return;
}
bool is_prime(int a) {
  if (a == 2) return true;
  if (!(a & 1) || a == 1) return false;
  for (int i = 3; i * i <= a; i += 2)
    if (!(a % i)) return false;
  return true;
}
bool is_prime(long long a) {
  if (a == 2) return true;
  if (!(a & 1) || a == 1) return false;
  for (long long i = 3; i * i <= a; i += 2)
    if (!(a % i)) return false;
  return true;
}
bool is_palindrome(string s) {
  int len = (int)s.length();
  int mid = len >> 1;
  for (int i = 0; i < mid; i++)
    if (s[i] != s[len - i - 1]) return false;
  return true;
}
int gcd(int a, int b) {
  while (b) {
    int mod = a % b;
    a = b;
    b = mod;
  }
  return a;
}
int lcm(int a, int b) { return a / gcd(a, b) * b; }
int binpow(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) res *= a;
    a *= a;
    b >>= 1;
  }
  return res;
}
int binpow(int a, int b, int MODULO) {
  int res = 1;
  while (b) {
    if (b & 1) {
      res *= a;
      res %= MODULO;
    }
    a *= a;
    a %= MODULO;
    b >>= 1;
  }
  return res;
}
long long gcd(long long a, long long b) {
  while (b) {
    long long mod = a % b;
    a = b;
    b = mod;
  }
  return a;
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long binpow(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res *= a;
    a *= a;
    b >>= 1;
  }
  return res;
}
long long binpow(long long a, long long b, long long MODULO) {
  long long res = 1;
  while (b) {
    if (b & 1) {
      res *= a;
      res %= MODULO;
    }
    a *= a;
    a %= MODULO;
    b >>= 1;
  }
  return res;
}
string binary(int N) {
  if (!N) return "0";
  string bin = "";
  while (N) {
    bin += '0' + (N & 1);
    N >>= 1;
  }
  reverse((bin).begin(), (bin).end());
  return bin;
}
string binary(long long N) {
  if (!N) return "0";
  string bin = "";
  while (N) {
    bin += '0' + (N & 1);
    N >>= 1;
  }
  reverse((bin).begin(), (bin).end());
  return bin;
}
const int INF = 2147483547;
const int MODULO = 1000000007;
const int _MODULO = 998244353;
const long long INF64 = 9223372036854775707;
const long long MODULO64 = 1000000007;
const long long _MODULO64 = 998244353;
const double epsilon = 10e-6;
const double PI = acos(-1);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m;
  cin >> n >> m;
  vector<int> ans;
  set<int> visited;
  map<int, int> dist;
  queue<int> q;
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    q.push(x);
    dist[x] = 0;
    visited.insert(x);
  }
  long long sum = 0;
  while (ans.size() < m) {
    int u = q.front();
    q.pop();
    if (visited.find(u + 1) == visited.end()) {
      dist[u + 1] = dist[u] + 1;
      sum += dist[u + 1];
      visited.insert(u + 1);
      ans.push_back(u + 1);
      q.push(u + 1);
    }
    if (ans.size() == m) break;
    if (visited.find(u - 1) == visited.end()) {
      dist[u - 1] = dist[u] + 1;
      sum += dist[u - 1];
      visited.insert(u - 1);
      ans.push_back(u - 1);
      q.push(u - 1);
    }
  }
  cout << sum << '\n';
  for (int p : ans) cout << p << " ";
  cout << '\n';
  return 0;
}
