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;
typedef long long int ll;
const ll M = 1000000007;
const ll N = 998244353;
ll power(ll x, ll y, ll p) {
  ll res = 1;
  x = x % p;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
ll inv(ll x, ll m) { return power(x, m - 2, m); }
ll nCr(ll n, ll r) {
  if (r == 0) return 1;
  vector<ll> fac(n);
  return (fac[n] * inv(fac[r], M) % M * inv(fac[n - r], M) % M) % M;
}
struct comp {
  template <typename T>
  bool operator()(const T &a, const T &b) {
    if (a.first == b.first)
      return (a.second < b.second);
    else
      return (a.first < b.first);
  }
};
bool mod(const pair<ll, ll> &a, const pair<ll, ll> &b) {
  if (a.first != b.first)
    return (a.first > b.first);
  else
    return (a.second > b.second);
}
void sieve() {
  vector<bool> pr(1000000 + 1, 1);
  for (ll i = 2; i * i <= 1000000; i++)
    if (pr[i] == 1)
      for (ll j = i * i; j <= 1000000; j += i) pr[j] = 0;
}
bool isValid(ll i, ll j, ll n, ll m) {
  if (i >= 0 && i < n && j >= 0 && j < m) {
    return true;
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ll n, m, i, j, k, num, num1, num2, flag = 0;
  cin >> n >> m;
  vector<ll> x, y;
  for (i = 0; i < n; i++) {
    cin >> num;
    x.push_back(num);
  }
  sort(x.begin(), x.end());
  queue<ll> q;
  set<ll> visited;
  map<ll, ll> dist;
  for (i = 0; i < n; i++) {
    q.push(x[i]);
    visited.insert(x[i]);
    dist[x[i]] = 0;
  }
  vector<ll> ans;
  ll s = 0;
  while (!q.empty() && ans.size() < m) {
    ll fr = q.front();
    s += dist[fr];
    if (dist[fr] > 0) {
      ans.push_back(fr);
    }
    if (!visited.count(fr + 1)) {
      q.push(fr + 1);
      visited.insert(fr + 1);
      dist[fr + 1] = dist[fr] + 1;
    }
    if (!visited.count(fr - 1)) {
      q.push(fr - 1);
      visited.insert(fr - 1);
      dist[fr - 1] = dist[fr] + 1;
    }
    q.pop();
  }
  cout << s << "\n";
  for (auto x = ans.begin(); x != ans.end(); x++) cout << *x << " ";
  cout << "\n";
  return 0;
}
