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 
n,m=map(int,input().split())
l=list(map(int,input().split()))
l.sort()
new=[l[0]]
for i in range(1,n-1):
	if l[i+1]-l[i-1]!=2:
		new.append(l[i])
new.append(l[-1])
d={}
for i in l:
	d[str(i)]=1
ans=[]
minans=l[0]
maxans=l[-1]
dist=1
count=0
while (maxans-minans+1)>(len(ans)+n) and len(ans)<m:
	for i in range(len(new)):
		if str(new[i]-dist) not in d:
			ans.append(new[i]-dist)
			d[str(new[i]-dist)]=1
			if new[i]-dist<minans:
				minans=new[i]-dist
			count+=dist
		if str(new[i]+dist) not in d:
			ans.append(new[i]+dist)
			d[str(new[i]+dist)]=1
			if new[i]+dist>maxans:
				maxans=new[i]+dist
			count+=dist
	new1=[new[0]]
	for i in range(1,len(new)-1):
		if str(new[i+1]) in d and str(new[i-1]) in d:
			new1.append(new[i])
	new1.append(new[-1])
	new=[]
	for i in range(len(new1)):
		new.append(new1[i])
	#print (d,dist,ans)
	dist+=1
if len(ans)>m:
	print (count-((dist-1)*(len(ans)-m)))
	for i in range(m):
		print (ans[i],end=" ")
	print ()
elif len(ans)==m:
	print (count)
	print (*ans)
else:
	if len(ans)>0:
		left = min(ans)
		right = max(ans)
	else:
		left = l[0]
		right = l[-1]
	rem = m-len(ans)
	dist=1
	if rem%2==0:
		for i in range(rem//2):
			ans.append(left-dist)
			dist+=1
			count+=abs(ans[-1]-l[0])
		dist=1
		for i in range(rem//2):
			ans.append(right+dist)
			dist+=1
			count+=abs(ans[-1]-l[-1])
	else:
		for i in range(rem//2):
			ans.append(left-dist)
			dist+=1
			count+=abs(ans[-1]-l[0])
		dist=1
		for i in range(rem//2+1):
			ans.append(right+dist)
			dist+=1
			count+=abs(ans[-1]-l[-1])
	print (count)
	print (*ans)