In Berland recently a new collection of toys went on sale. This collection consists of 10^9 types of toys, numbered with integers from 1 to 10^9. A toy from the new collection of the i-th type costs i bourles.

Tania has managed to collect n different types of toys a_1, a_2, ..., a_{n} from the new collection. Today is Tanya's birthday, and her mother decided to spend no more than m bourles on the gift to the daughter. Tanya will choose several different types of toys from the new collection as a gift. Of course, she does not want to get a type of toy which she already has.

Tanya wants to have as many distinct types of toys in her collection as possible as the result. The new collection is too diverse, and Tanya is too little, so she asks you to help her in this.


-----Input-----

The first line contains two integers n (1 ≤ n ≤ 100 000) and m (1 ≤ m ≤ 10^9) — the number of types of toys that Tanya already has and the number of bourles that her mom is willing to spend on buying new toys.

The next line contains n distinct integers a_1, a_2, ..., a_{n} (1 ≤ a_{i} ≤ 10^9) — the types of toys that Tanya already has.


-----Output-----

In the first line print a single integer k — the number of different types of toys that Tanya should choose so that the number of different types of toys in her collection is maximum possible. Of course, the total cost of the selected toys should not exceed m.

In the second line print k distinct space-separated integers t_1, t_2, ..., t_{k} (1 ≤ t_{i} ≤ 10^9) — the types of toys that Tanya should choose.

If there are multiple answers, you may print any of them. Values of t_{i} can be printed in any order.


-----Examples-----
Input
3 7
1 3 4

Output
2
2 5 

Input
4 14
4 6 12 8

Output
4
7 2 3 1



-----Note-----

In the first sample mom should buy two toys: one toy of the 2-nd type and one toy of the 5-th type. At any other purchase for 7 bourles (assuming that the toys of types 1, 3 and 4 have already been bought), it is impossible to buy two and more toys.

Difficulty: EASY

Solutions:
(n, m) = map(int, input().split())
a = set(map(int, input().split()))
i = 1
cnt = 0
b = []
while i <= m:
	if i not in a:
		m -= i
		b.append(str(i))
		cnt += 1
	i += 1
print(cnt)
print(' '.join(b))


(n, m) = map(int, input().split())
x = set(map(int, input().split()))
answer = []
i = 1
while True:
	if i > m:
		break
	if i in x:
		i += 1
		continue
	else:
		answer.append(i)
		m -= i
		i += 1
print(len(answer))
print(' '.join(map(str, answer)))


from math import sqrt, floor
from itertools import takewhile
inputs1st = list(map(int, input().split(' ')))
inputs2nd = list(map(int, input().split(' ')))

def solve(bourles, xs):
	s = set(xs)
	index1 = 0
	index2 = 0
	ans = set()
	for i in range(1, 150000):
		if i > bourles:
			break
		if len(s) > 0 and i in s:
			s.remove(i)
			continue
		ans.add(i)
		bourles -= i
	return list(ans)
ans = solve(inputs1st[1], inputs2nd)
print(len(ans))
print(' '.join(list(map(str, ans))))


(n, m) = map(int, input().split())
t = set((int(x) for x in input().split()))
i = 1
ans = list()
while m >= i:
	if i in t:
		i += 1
		continue
	ans.append(i)
	m -= i
	i += 1
print(len(ans))
print(*ans)


(n, k) = list(map(int, input().split()))
p = list(map(int, input().split()))
p.sort()
x = {}
da = []
s = 1
l = 0
for item in p:
	x[item] = 1
while l < k:
	if s not in x:
		da.append(s)
		l += s
		s += 1
	else:
		s += 1
if sum(da) > k:
	da.pop()
else:
	pass
print(len(da))
print(*da)


(n, m) = map(int, input().split(' '))
a = list(map(int, input().split(' ')))
b = []
a.sort()
li = 0
i = 1
k = 0
la = len(a)
while i <= m:
	if li < la and a[li] < i:
		li += 1
	elif li < la and a[li] == i:
		i += 1
	else:
		m -= i
		k += 1
		b.append(i)
		i += 1
print(k)
for it in b:
	print(it, end=' ')


(n, m) = [int(x) for x in input().split(' ')]
a = [int(x) for x in input().split(' ')]
a.sort()
r = []
step = 1
current = 0
while m > 0 and m >= step:
	if current < n and a[current] == step:
		current += 1
		step += 1
		continue
	m -= step
	r.append(str(step))
	step += 1
print(len(r))
print(' '.join(r))


r = lambda : map(int, input().split())
(n, cash) = r()
t = set(r())
c = 1
out = ''
while cash > 0:
	if c not in t:
		cash -= c
		out += str(c) + ' '
	c += 1
size = len(out.strip().split()) - int(cash != 0)
print(size)
print(' '.join(out.strip().split()[:size]))


(n, m) = map(int, input().split())
A = list(map(int, input().split()))
A.sort()
A.append(10 ** 9 + 1)
B = []
answer = 0
cou = 0
per = 1
per2 = True
for i in range(n + 1):
	if per2 == False:
		break
	while per != A[i]:
		answer += per
		if answer <= m:
			cou += 1
			B.append(per)
		else:
			print(cou)
			print(' '.join(map(str, B)))
			per2 = False
			break
		per += 1
	per += 1


(n, m) = map(int, input().split())
arr = list(map(int, input().split()))
d = {}
for i in arr:
	d[i] = 0
ans = []
i = 1
summ = sum(ans)
while summ < m:
	if i not in d:
		if i + summ <= m:
			ans.append(i)
			summ += i
		else:
			break
	i += 1
print(len(ans))
print(*ans)


(n, k) = map(int, input().split())
h = set(map(int, input().split()))
bought = []
i = 1
for i in range(1, 10 ** 9 + 1):
	if k < i:
		break
	if i not in h:
		bought.append(i)
		k -= i
print(len(bought))
print(' '.join(map(str, bought)))


(n, m) = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
curr = 1
i = 0
b = []
while m > 0:
	if i < n and a[i] > curr:
		m -= curr
		b.append(curr)
		curr += 1
	elif i < n and a[i] == curr:
		curr = a[i] + 1
		i += 1
	elif i == n:
		curr = a[-1] + 1
		i += 1
	elif i == n + 1:
		b.append(curr)
		m -= curr
		curr += 1
if m == 0:
	print(len(b))
	print(*b)
else:
	print(len(b) - 1)
	print(*b[:len(b) - 1])


(x, y) = map(int, input().split())
a = list(map(int, input().split()))
d = {}
for i in a:
	d[i] = i
ary = []
i = 1
while i <= y:
	if i in d:
		i += 1
	else:
		y -= i
		ary += [i]
		i += 1
print(len(ary))
print(*ary)


from sys import stdin
input = stdin.readline
(n, m) = map(int, input().split())
have = set(list(map(int, input().split())))
cur = 0
p = []
for i in range(1, 200002):
	if cur + i > m:
		break
	if i in have:
		continue
	if cur + i <= m:
		cur += i
		p.append(str(i))
print(len(p))
print(' '.join(p))


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [tuple(map(int, l.split())) for l in sys.stdin]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	(n, m) = LI()
	a = sorted(LI()) + [inf]
	r = []
	ai = 0
	i = 1
	while m >= i:
		if a[ai] == i:
			ai += 1
			i += 1
		else:
			m -= i
			r.append(i)
			i += 1
	return '{}\n{}'.format(len(r), ' '.join(map(str, r)))
print(main())


(n, m) = map(int, input().split())
a = set(list(map(int, input().split())))
k = 1
b = []
while k <= m:
	if k not in a:
		b.append(k)
		m -= k
	k += 1
print(len(b))
print(*b)


(n, m) = list(map(int, input().split(' ')))
a = sorted(list(map(int, input().split(' '))))
b = []
j = 0
for i in range(1, 10 ** 9 + 1):
	if i > m:
		break
	if i <= m and (j >= n or i != a[j]):
		b.append(i)
		m -= i
	if j < n and i == a[j]:
		j += 1
print(len(b))
print(' '.join(map(str, b)))


temparr = input()
temparr = temparr.split()
n = int(temparr[0])
m = int(temparr[1])
temparr = input()
temparr = temparr.split()
dicts = {}
for i in temparr:
	i = int(i)
	if i not in dicts:
		dicts[i] = 1
newtoy = 0
moneyleft = m
ans = []
for i in range(1, m + 1):
	if moneyleft < i:
		break
	if i not in dicts:
		newtoy += 1
		moneyleft -= i
		ans.append(str(i))
		continue
print(newtoy)
print(' '.join(ans))


(n, m) = (int(i) for i in input().split())
q = set(map(int, input().split()))
s = 0
k = 1
ansv = 0
ans = []
while s < m:
	if not k in q:
		if s + k <= m:
			s += k
			ans += [k]
			ansv += 1
		else:
			break
	k += 1
print(ansv)
print(' '.join(list(map(str, ans))))


(n, m) = tuple(map(int, input().split()))
a = set(map(int, input().split()))
ans = []
for x in range(1, 10 ** 9 + 1):
	if m < x:
		break
	if x not in a:
		ans.append(x)
		m -= x
print(len(ans))
print(' '.join(map(str, ans)))


(n, m) = map(int, input().split())
a = set(map(int, input().split()))
t = []
for i in range(1, 10 ** 9 + 1):
	if i in a:
		continue
	elif m < i:
		break
	else:
		t.append(i)
		m -= i
print(len(t))
print(*t)


(n, m) = tuple(map(int, input().split()))
lista = list(map(int, input().split()))
res = []
indice = 0
i = 1
lista = sorted(lista)
while i <= m:
	if i < lista[indice]:
		res.append(i)
		m -= i
		if m == i:
			i = 300 * m
		i += 1
	else:
		if i == lista[indice]:
			i += 1
		indice += 1
		if indice == len(lista):
			while i <= m:
				res.append(i)
				m -= i
				if m == i:
					i = 300 * m
				i += 1
print(len(res))
print(str.join(' ', list(map(str, res))))


(n, m) = [int(x) for x in input().split(' ')]
d = {}
for x in input().split(' '):
	d[int(x)] = 1
ansarr = []
i = 1
while m > 0:
	if i not in d:
		if m >= i:
			m -= i
			ansarr.append(i)
		else:
			m = 0
	i += 1
print(len(ansarr))
if len(ansarr):
	print(' '.join(map(str, ansarr)))


(n, m) = list(map(int, input().split()))
a = list(map(int, input().split()))
a.sort()
a.append(10 ** 10)
ans = []
cand = 1
for i in range(len(a)):
	while cand < a[i]:
		m -= cand
		if m < 0:
			print(len(ans))
			if len(ans) > 0:
				print(*ans)
			return
		ans.append(cand)
		cand += 1
	cand = a[i] + 1


(n, m) = map(int, input().split())
already = list(map(int, input().strip().split()))
already_ = [0] * 200001
for i in already:
	if i < 200001:
		already_[i] = 1
res = []
cnt = 0
for i in range(1, len(already_)):
	if already_[i] == 0:
		m -= i
		if m >= 0:
			res.append(i)
			cnt += 1
		else:
			break
print(cnt)
for i in res:
	print(i, end=' ')


(n, m) = map(int, input().split())
l = list(map(int, input().split()))
l = sorted(l)
l1 = []
for i in range(1, l[0]):
	if m - i >= 0:
		m = m - i
		l1.append(i)
	else:
		break
c = 0
for i in range(n - 1):
	for j in range(l[i] + 1, l[i + 1]):
		if m - j >= 0:
			m = m - j
			l1.append(j)
		else:
			c = 1
			break
	if c == 1:
		break
for j in range(l[n - 1] + 1, 1000000000000000):
	if m - j >= 0:
		m = m - j
		l1.append(j)
	else:
		break
print(len(l1))
print(*l1)


(n, m) = map(int, input().split())
a = set(map(int, input().split()))
ret = list()
t = 1
while True:
	if m < t:
		break
	if t not in a:
		m -= t
		ret.append(t)
	t += 1
print(len(ret))
if ret:
	print(' '.join(map(str, ret)))


f1 = lambda : list(map(int, input().split()))
f2 = lambda : map(int, input().split())
(n, k) = f2()
arr = set(map(int, input().split()))
ans = []
i = 1
while k >= i:
	if i not in arr:
		ans.append(i)
		arr.add(i)
		k -= i
	i += 1
print(len(ans))
print(*ans)


(n, m) = map(int, input().split())
alreadys = set(map(int, input().split()))
sum = 0
buys = []
max_alreadys = max(alreadys)
for i in range(m):
	cur = i + 1
	if cur <= max_alreadys:
		if cur in alreadys:
			continue
	if sum + cur <= m:
		sum += cur
		buys.append(cur)
	else:
		break
print(len(buys))
print(' '.join(map(str, buys)))


import os
import sys
from io import BytesIO, IOBase

def main():
	(n, m) = map(int, input().split())
	a = map(int, input().split())
	vis = set(a)
	i = 1
	res = []
	while m > 0:
		if i not in vis:
			if m - i < 0:
				break
			res.append(i)
			m -= i
		i += 1
	print(len(res))
	for x in res:
		print(x, end=' ')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


(n, m) = map(int, input().split())
A = list(map(int, input().split()))
set_A = set(A)
now = 0
ans = 0
i = 1
L = []
while True:
	if i in set_A:
		i += 1
		continue
	if now + i <= m:
		L.append(i)
		now += i
		ans += 1
	else:
		break
	i += 1
print(ans)
print(' '.join(map(str, L)))


(n, m) = map(int, input().split())
l = list(map(int, input().split()))
l.sort()
x = [0] * (2 * 100000)
for i in range(n):
	if l[i] >= len(x):
		pass
	else:
		x[l[i]] = 1
a = []
for i in range(1, len(x)):
	if x[i] == 0:
		m -= i
		if m >= 0:
			a.append(i)
		else:
			break
print(len(a))
print(*a)


II = lambda : map(int, input().split())
(n, m) = II()
s = set(II())
a = 0
p = list()
for x in range(1, 10 ** 6):
	if a + x > m:
		break
	if x not in s:
		a += x
		s.add(x)
		p.append(x)
print(len(p))
print(' '.join(map(str, p)))


(n, m) = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
a.sort()
(k, c) = (0, m)
t = []
for i in range(1, m + 1):
	if c < 0:
		break
	if k < n:
		if a[k] != i:
			c -= i
			if c >= 0:
				t.append(i)
		else:
			k += 1
	else:
		c -= i
		if c >= 0:
			t.append(i)
print(len(t))
for i in t:
	print(i, end=' ')


(n, m) = map(int, input().split())
arr = sorted(list(map(int, input().split()))) + [0]
j = summ = count = 0
i = 1
lst = []
while i <= 10 ** 9:
	if i != arr[j]:
		if summ + i <= m:
			lst.append(i)
			summ += i
			count += 1
		else:
			break
	else:
		j += 1
	i += 1
print(count)
print(*lst)


from sys import stdin, stdout
(a, b) = map(int, stdin.readline().split())
d = dict()
for i in map(int, stdin.readline().split()):
	d[i] = d.get(i, 0) + 1
i = 1
z = []
b1 = b
k = ''
f = 0
while i <= b1 and b - i >= 0:
	if d.get(i, 0) == 0 and b - i >= 0:
		z += [i]
		b -= i
		f += 1
		k += str(i) + ' '
	i += 1
stdout.write(str(f) + '\n' + k)


(n, m) = map(int, input().split())
l = sorted(map(int, input().split()))
nom = 0
ans = []
for i in range(1, m + 1):
	if i > m:
		break
	if len(l) > nom and i == l[nom]:
		nom += 1
	else:
		ans += [str(i)]
		m -= i
print(len(ans))
print(' '.join(ans))


(t, m) = map(int, input().split())
x = sorted(list(map(int, input().split())))
pos = 0
buys = []
i = 1
while True:
	if pos < t and i == x[pos]:
		pos += 1
	elif i > m:
		break
	else:
		m -= i
		buys.append(i)
	i += 1
print(len(buys))
print(' '.join(list(map(str, buys))))


(num_doll, money) = map(int, input().split())
dolls = set(list(map(int, input().split())))
counter = 1
dolls_to_buy = []
while money >= counter:
	if counter not in dolls:
		dolls_to_buy.append(counter)
		money -= counter
	counter += 1
print(len(dolls_to_buy))
print(*dolls_to_buy)


def main():
	(n, m) = map(int, input().strip().split())
	t = {int(x) for x in input().strip().split()}
	new = []
	for i in range(1, 10 ** 9 + 1):
		if i > m:
			break
		if i not in t:
			m -= i
			new.append(i)
	print(len(new))
	if new:
		print(' '.join(map(str, new)))
main()


(n, m) = list(map(int, input().split()))
l = set(list(map(int, input().split())))
i = 1
s = []
while i <= m:
	if i not in l:
		s.append(i)
		m -= i
	i += 1
print(len(s))
print(*s)


(n, m) = map(int, input().split())
a = list(map(int, input().split()))
t = []
toys = 10 ** 6 * [0]
for i in range(len(a)):
	if a[i] < 10 ** 6:
		toys[a[i]] = 1
for i in range(1, 10 ** 6):
	if toys[i] == 0:
		if m < i:
			break
		t.append(str(i))
		m -= i
print(len(t))
print(' '.join(t))


import math
from collections import defaultdict

def r():
	return int(input())

def rm():
	return map(int, input().split())

def rl():
	return list(map(int, input().split()))
(n, m) = rm()
a = defaultdict(int)
b = rl()
for i in b:
	a[i] = 1
res = 0
resa = []
for j in range(1, 10 ** 9 + 1):
	if m <= 0 or m < j:
		break
	if a[j] != 1:
		if m >= j:
			res += 1
			resa.append(j)
			m -= j
print(res)
print(*resa)


(n, m) = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
s = 0
count = 1
i = 0
answer = []
while i < len(a) and s <= m:
	if a[i] == count:
		i += 1
		count += 1
	else:
		s += count
		answer.append(count)
		count += 1
if s > m:
	s = s - count + 1
	print(len(answer) - 1)
	for i in range(len(answer) - 1):
		print(answer[i], end=' ')
elif s == m:
	print(len(answer))
	for i in range(len(answer)):
		print(answer[i], end=' ')
else:
	while s <= m:
		s += count
		answer.append(count)
		count += 1
	if s == m:
		print(len(answer))
		for i in range(len(answer)):
			print(answer[i], end=' ')
	else:
		s = s - count + 1
		print(len(answer) - 1)
		for i in range(len(answer) - 1):
			print(answer[i], end=' ')


from sys import stdin, stdout
(a, b) = map(int, stdin.readline().split())
d = dict()
for i in map(int, stdin.readline().split()):
	d[i] = d.get(i, 0) + 1
i = 1
z = []
b1 = b
while i <= b1 and b - i >= 0:
	if d.get(i, 0) == 0 and b - i >= 0:
		z += [i]
		b -= i
	i += 1
print(len(z))
print(*z)


(n, m) = [int(x) for x in input().split()]
arr = [int(x) for x in input().split()]
arr.append(1000000002)
arr = sorted(arr)
curr = 0
i = 1
res = []
ans = 0
while m >= i:
	if i == arr[curr]:
		i += 1
		curr += 1
		continue
	ans += 1
	res.append(i)
	m -= i
	i += 1
print(ans)
for x in res:
	print(x, end=' ')


(n, k) = map(int, input().split())
m = k
l = list(map(int, input().split()))
s = set(l)
d = set()
for i in range(1000000):
	if i + 1 in s and m >= 0:
		continue
	elif m - i - 1 >= 0:
		m = m - i - 1
		d.add(i + 1)
print(len(d))
print(*d)


(n, m) = list(map(int, input().split()))
has = list(map(int, input().split()))
has.sort()
res = []
uc = 0
for i in range(1, 10 ** 9 + 1):
	if uc < len(has) and has[uc] == i:
		uc += 1
	elif m - i < 0:
		break
	else:
		m -= i
		res.append(i)
print(len(res))
print(*res)


(n, m) = map(int, input().split(' '))
a = set(map(int, input().split(' ')))
ans = []
k = 1
while m >= k:
	if k not in a:
		m -= k
		ans.append(str(k))
	k += 1
print(len(ans))
print(' '.join(ans))


(n, m) = map(int, input().split())
a = sorted(list(map(int, input().split())))
a.append(10000000000)
n = 100000
z = list(range(1, 200001))
z = list(set(z) - set(a))
p = []
ans = 0
for i in z:
	if i > m:
		break
	else:
		ans += 1
		p.append(i)
		m -= i
print(ans)
print(*p)


(N, M) = map(int, input().split(' '))
alreadyOwned = set(sorted(map(int, input().split(' '))))

def solve(toys, change):
	path = []
	for x in range(1, change + 1):
		if change - x < 0:
			return path
		if x not in alreadyOwned:
			path.append(str(x))
			change -= x
	return path
result = solve(N, M)
print(len(result))
print(' '.join(result))


(n, m) = map(int, input().split(' '))
a = [int(i) for i in input().split(' ')]
a = set(a)
b = []
cc = 0
lim = int(1000000000.0)
i = 1
while i <= m:
	if i not in a:
		cc += 1
		b.append(i)
		m -= i
	i += 1
print(cc)
for i in range(len(b)):
	print(b[i], end=' ')


(a, b) = map(int, input().split())
d = dict()
for i in map(int, input().split()):
	d[i] = d.get(i, 0) + 1
i = 1
z = []
b1 = b
while i <= b1 and b - i >= 0:
	if d.get(i, 0) == 0 and b - i >= 0:
		z += [i]
		b -= i
	i += 1
print(len(z))
print(*z)


(n, m) = [int(x) for x in input().split()]
toys = set([int(x) for x in input().split()])
newtoy = []
for i in range(1, m + 1):
	if i not in toys and m >= i:
		m -= i
		newtoy.append(str(i))
	if m < i:
		break
print(len(newtoy))
print(' '.join(newtoy))


(a, b) = input().split()
a = int(a)
b = int(b)
h = [0] * 10000000
l = list(map(int, input().split()))
for i in range(len(l)):
	if l[i] < len(h):
		h[l[i]] += 1
sum = 0
i = 1
p = []
for i in range(1, b + 1):
	if h[i]:
		continue
	else:
		if sum + i > b:
			break
		sum += i
		h[i] += 1
		p.append(i)
print(len(p))
p = map(str, p)
print(' '.join(p))


(n, m) = map(int, input().split(' '))
a = set(map(int, input().split(' ')))
b = list()
i = 1
while m >= i:
	if i not in a:
		m -= i
		b.append(i)
	i += 1
print(len(b))
print(' '.join(map(str, b)))


def main():
	(n, k) = (int(x) for x in input().split())
	L = [int(x) for x in input().split()]
	toys = solver(L, k)
	print(len(toys))
	for x in toys:
		print(x, end=' ')

def solver(L, k):
	sortedL = sorted(L)
	Lindex = 0
	toys = []
	last = None
	for x in range(1, 10 ** 9 + 1):
		if x > k:
			break
		elif Lindex >= len(sortedL):
			last = sortedL[len(sortedL) - 1] + 1
			break
		elif x == sortedL[Lindex]:
			Lindex += 1
			continue
		else:
			toys.append(x)
			k -= x
	if last != None:
		for x in range(last, 10 ** 9):
			if x > k:
				break
			else:
				toys.append(x)
				k -= x
	return toys
main()


def main():
	(n, m) = map(int, input().split())
	(aa, res) = (set(map(int, input().split())), [])
	for i in range(1, m + 1):
		if i not in aa:
			if i <= m:
				res.append(i)
				m -= i
			else:
				break
	print(len(res))
	print(' '.join(map(str, res)))
main()


from sys import stdin, stdout
(n, m) = map(int, stdin.readline().strip().split())
s = list(map(int, stdin.readline().strip().split()))
s.sort()
s.append(10 ** 9 + 1)
l = 1
ans = []
flag = False
for i in s:
	for j in range(l, i):
		if m - j >= 0:
			m -= j
			ans.append(j)
		else:
			flag = True
			break
	l = i + 1
	if flag:
		break
print(len(ans))
print(*ans)


import sys
input = sys.stdin.readline
(n, m) = [int(x) for x in input().split()]
already = set([int(x) for x in input().split()])
x = 1
c = []
while m >= x and x <= 1000000000:
	if x in already:
		x += 1
		continue
	m -= x
	c.append(str(x))
	x += 1
print(len(c))
print(' '.join(c))


(n, k) = map(int, input().split())
x = set(map(int, input().split()))
y = []
s = 0
for i in range(1, 10000000000):
	if i in x:
		continue
	s += i
	if s > k:
		break
	y.append(i)
print(len(y))
print(*y)


(n, m) = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]
sn = set(b)
summ = 0
count = 0
a = []
i = 1
while i > 0:
	if summ + i <= m and i not in sn:
		summ += i
		count += 1
		a.append(i)
	if summ == m or summ + i > m:
		break
	i += 1
print(count)
for i in range(count):
	print(a[i], end=' ')


(n, m) = map(int, input().split())
a = sorted(list(map(int, input().split())))
t = 0
ans = []
i = 0
p = 1
while m > 0:
	if i < n and a[i] == p:
		i += 1
	elif m >= p:
		m -= p
		t += 1
		ans.append(p)
	else:
		break
	p += 1
print(t)
for i in ans:
	print(i, end=' ')


L = [int(s) for s in input().split()]
(n, m) = (L[0], L[1])
used = set(map(int, input().split()))
cur = 1
ans = []
while cur <= m:
	if not cur in used:
		ans += [cur]
		m -= cur
	cur += 1
print(len(ans))
print(*ans)


(num, y) = map(int, input().split())
inp1 = list(map(int, input().split()))
inp1 = set(inp1)
count1 = 1
s = [0] * 100000
b = 0
while y - count1 >= 0:
	if not count1 in inp1:
		s[b] = count1
		b += 1
		y -= count1
		inp1.add(count1)
	count1 += 1
print(b)
for j in range(b):
	print(s[j], end=' ')


(n, m) = map(int, input().split())
line = list(map(int, input().split()))
line.sort()
p = v = 0
rest = list()
for i in range(1, 1000000001):
	if p < n and i == line[p]:
		p += 1
		continue
	if v + i <= m:
		rest.append(i)
		v += i
	else:
		break
print(len(rest))
print(' '.join(map(str, rest)))


(n, m) = [int(i) for i in input().split()]
l = [int(i) for i in input().split()]
ans = []
from collections import Counter
c = Counter(l)
for x in range(1, 10 ** 9):
	if m < x:
		break
	if not c[x]:
		ans.append(x)
		m -= x
print(len(ans))
print(*ans)


(n, m) = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
(i, j, an) = (0, 1, [])
while m > 0:
	if i < n and a[i] == j:
		i += 1
		j += 1
		continue
	an.append(j)
	m -= j
	j += 1
	if m < 0:
		an.pop()
		break
print(len(an))
print(*an)


read_ints = lambda : list(map(int, input().split()))

def solve(n, m, s):
	ans = []
	i = 1
	while m - i >= 0:
		if i not in s:
			m -= i
			ans.append(i)
		i += 1
	return ans
(n, m) = read_ints()
s = set(read_ints())
ans = solve(n, m, s)
print(len(ans))
for a in ans:
	print(a, end=' ')


import sys
input = sys.stdin.readline
(n, m) = map(int, input().split())
a = set(map(int, input().split()))
ans = []
for i in range(1, 10 ** 9 + 1):
	if i in a:
		continue
	if m - i >= 0:
		ans.append(i)
		m -= i
	else:
		break
print(len(ans))
print(*ans)


(n, k) = map(int, input().split())
l = list(map(int, input().split()))
s = set()
for i in l:
	s.add(i)
sm = 0
i = 1
m = []
while True:
	if not i in s:
		if sm + i > k:
			break
		else:
			sm = sm + i
			m.append(i)
	i += 1
print(len(m))
print(*m)


(N, M) = [int(x) for x in input().split()]
Ns = [int(x) for x in input().split()]
wi = 1
ans = 0
Opt = []
Ns.sort()
Ns.append(100000000000)
mi = 0
while M >= wi:
	if wi != Ns[mi]:
		ans += 1
		Opt.append(wi)
		M -= wi
	else:
		mi += 1
	wi += 1
print(ans)
for wi in Opt:
	print(wi, end=' ')


(n, w) = map(int, input().split())
c = list(map(int, input().split()))
c.sort()
x = 0
i = 0
m = []
a = len(c) - 1
while w >= 0:
	i += 1
	if c[x] == i:
		if x != a:
			x += 1
		continue
	w -= i
	m.append(i)
print(len(m) - 1)
print(' '.join(map(str, m[:-1])))


(n, m) = map(int, input().split(' '))
l = list(map(int, input().split(' ')))
used = set(l)
k = 0
t = []
price = 1
while m >= price:
	if price not in used:
		used.add(price)
		t.append(str(price))
		k += 1
		m -= price
	price += 1
print(k)
print(' '.join(t))


I = lambda : map(int, input().split())
(n, m) = I()
t = set(I())
b = []
for i in range(1, 10 ** 6):
	if i in t:
		continue
	if i > m:
		break
	b.append(str(i))
	m -= i
print(len(b))
print(' '.join(b))


(n, money) = map(int, input().strip().split())
taken = set(map(int, input().strip().split()))
count = 0
new_toys = []
for i in range(1, 10 ** 9 + 1):
	if i > money:
		break
	if i not in taken:
		count += 1
		money -= i
		new_toys.append(i)
print(count)
print(*new_toys)


(n, m) = map(int, input().split())
a = set(map(int, input().split()))
(s, z, k) = ('', 1, 0)
while m >= z:
	if z not in a:
		m -= z
		k += 1
		s += str(z) + ' '
	z += 1
print(k)
print(s)


(n, m) = map(int, input().split())
count = 0
b = []
c = m
a = set(map(int, input().split()))
for i in range(1, c + 1):
	if i not in a and m >= i:
		count = count + 1
		b.append(i)
		m = m - i
	if i > m:
		break
print(count)
print(*b)


(n, m) = [int(i) for i in input().split()]
owned = set(map(int, input().split()))
purchased = []
count = 1
while m >= count:
	if count not in owned:
		m -= count
		purchased.append(str(count))
	count = count + 1
print(len(purchased))
print(' '.join(purchased))


(n, m) = map(int, input().split())
s_t = set(map(int, input().split()))
s_b = set()
i = 1
while m >= i:
	if i not in s_t:
		s_b.add(i)
		m -= i
	i += 1
print(len(s_b))
print(' '.join((str(x) for x in s_b)))


(n, m) = list(map(int, input().split()))
a = list(map(int, input().split()))
a = sorted(a)
ans = []
cur = 1
idx = 0
while m > 0 and cur <= m:
	if idx < len(a):
		if a[idx] > cur:
			m -= cur
			ans.append(cur)
			cur += 1
		else:
			idx += 1
			cur += 1
	else:
		m -= cur
		ans.append(cur)
		cur += 1
print(len(ans))
print(' '.join(map(str, ans)))


(n, m) = map(int, input().strip().split(' '))
l = sorted(list(map(int, input().strip().split(' '))))
ret = []
s = c = 0
check = 0
for i in range(1, l[n - 1]):
	omg = l[check]
	if i < omg:
		s += i
		if s > m:
			break
		ret.append(i)
		c += 1
	else:
		check += 1
i = l[n - 1] + 1
s += i
while s <= m:
	ret.append(i)
	c += 1
	s += i
	i += 1
if sum(ret) > m:
	c -= 1
print(c)
for i in range(c):
	print(ret[i], end=' ')


(a, b) = map(int, input().split())
arr = set(map(int, input().split()))
n = 0
ans = []
ct = 0
i = 1
while 1:
	if i not in arr:
		if ct + i <= b:
			ans.append(i)
			ct += i
			n += 1
		else:
			break
	i += 1
print(n)
print(*ans)


(n, m) = tuple(map(int, input().split()))
t = sorted(list(map(int, input().split())))
mmax = 1000000000.0
toymax = int(0.5 * (-1 + (1 + 8 * mmax) ** 0.5) + 1 + 100000.0)
buy = [1 for i in range(toymax + 1)]
for i in t:
	if i <= len(buy) - 1:
		buy[i] = 0
	elif i >= len(buy):
		break
s = 0
a = []
spent = 0
for b in range(len(buy) - 1):
	if buy[b + 1] == 1:
		spent += b + 1
		if spent <= m:
			s += 1
			a.append(b + 1)
		else:
			break
	else:
		pass
print(s)
print(' '.join([str(x) for x in a]))


(n, m) = [int(i) for i in input().split()]
s = {int(i) for i in input().split()}
res = []
i = 1
while i <= m:
	if i not in s:
		m -= i
		res.append(str(i))
	i += 1
print(len(res))
print(' '.join(res))


def process(A, m):
	A = set(A)
	answer = []
	for i in range(1, m + len(A) + 1):
		if i not in A and m >= i:
			answer.append(i)
			m -= i
		if i > m:
			break
	return answer
(n, m) = [int(x) for x in input().split()]
A = [int(x) for x in input().split()]
answer = process(A, m)
print(len(answer))
print(' '.join(map(str, answer)))


from sys import stdin
(n, m) = map(int, stdin.readline().split())
arr = list(map(int, stdin.readline().split()))
d = {}
for a in arr:
	d[a] = 0
i = 1
a = 0
ans = []
while m > 0:
	if d.get(i) == None:
		if m - i < 0:
			break
		m -= i
		a += 1
		ans.append(i)
	i += 1
print(a)
print(*ans)


(n, m) = (int(x) for x in input().split())
a = [int(x) for x in input().split()]
a.sort()
i = 0
c = 1
ans = []
n_ans = 0
while m > 0 and i < n:
	if c != a[i]:
		m -= c
		if m >= 0:
			ans.append(c)
			n_ans = n_ans + 1
	if c == a[i]:
		i = i + 1
	c = c + 1
while m > 0:
	m -= c
	if m >= 0:
		ans.append(c)
		n_ans = n_ans + 1
	c = c + 1
print(n_ans)
for i in range(n_ans):
	print(ans[i], ' ', sep='', end='')


from math import sqrt

def sn(awal, akhir):
	n = akhir - awal + 1
	return n * (2 * awal + (n - 1)) // 2

def binary_search(a, start, end, search):
	if start == end:
		if sn(a, start) <= search:
			return start
		else:
			return -1
	mid = start + (end - start) // 2
	if search < sn(a, mid):
		return binary_search(a, start, mid, search)
	ret = binary_search(a, mid + 1, end, search)
	if ret == -1:
		return mid
	else:
		return ret
(n, m) = map(int, input().split())
t = [0] + sorted(list(map(int, input().split()))) + [10 ** 9]
ans = []
for i in range(1, len(t)):
	mulai = t[i - 1] + 1
	akhir = t[i] - 1
	if mulai <= akhir:
		x = binary_search(mulai, mulai, akhir, m) - mulai
		m -= sn(mulai, mulai + x)
		ans.extend([j for j in range(mulai, mulai + x + 1)])
		if mulai + x != akhir:
			break
print(len(ans))
print(*ans)


(n, k) = map(int, input().split())
l = sorted(list(map(int, input().split())))
i = 1
j = 0
s = 0
h = []
g = len(l) - 1
while k >= i:
	if i == l[j]:
		j = j + 1
		if j > g:
			j = g
	else:
		k = k - i
		s = s + 1
		h.append(i)
	i = i + 1
print(s)
print(*h, sep=' ')


(n, m) = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
if a[-1] != 10 ** 9:
	a.append(10 ** 9)
k = 0
s = 0
j = 0
ans = []
for i in range(1, 150000):
	if i < a[j]:
		if s + i <= m:
			ans.append(i)
			s += i
	elif i == a[j]:
		j += 1
	if s >= m:
		break
print(len(ans))
print(*ans)


(n, m) = map(int, input().split())
a = [0]
a = a + list(map(int, input().split()))
a = sorted(a)
a.append(m + 1)
c = []
for i in range(len(a) - 1):
	c.append([a[i], a[i + 1]])
l = []
k = 0
for i in range(len(c)):
	for j in range(c[i][0] + 1, c[i][1]):
		m -= j
		l.append(j)
		if m < 0:
			k += 1
			break
	if k == 1:
		break
if k == 1:
	del l[-1]
print(len(l))
print(*l)


(_, money) = map(int, input().split())
toys = set(map(int, input().split()))
to_buy = []
for i in range(1, 1000000001):
	if money < i:
		break
	if i not in toys:
		to_buy.append(i)
		money -= i
print(len(to_buy))
print(*to_buy)


from collections import deque as de
import math
from collections import Counter as cnt
from functools import reduce
from typing import MutableMapping
from itertools import groupby as gb

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))

class My_stack:

	def __init__(self):
		self.data = []

	def my_push(self, x):
		return self.data.append(x)

	def my_pop(self):
		return self.data.pop()

	def my_peak(self):
		return self.data[-1]

	def my_contains(self, x):
		return self.data.count(x)

	def my_show_all(self):
		return self.data

	def isEmpty(self):
		return len(self.data) == 0
arrStack = My_stack()

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def get_prime_factors(number):
	prime_factors = []
	while number % 2 == 0:
		prime_factors.append(2)
		number = number / 2
	for i in range(3, int(math.sqrt(number)) + 1, 2):
		while number % i == 0:
			prime_factors.append(int(i))
			number = number / i
	if number > 2:
		prime_factors.append(int(number))
	return prime_factors

def get_frequency(list):
	dic = {}
	for ele in list:
		if ele in dic:
			dic[ele] += 1
		else:
			dic[ele] = 1
	return dic

def Log2(x):
	return math.log10(x) / math.log10(2)

def isPowerOfTwo(n):
	return math.ceil(Log2(n)) == math.floor(Log2(n))
(n, m) = map(int, input().split())
dic = {}
for (key, value) in enumerate(input().split()):
	dic[int(value)] = key
ans = []
for i in range(1, 1000000000):
	if i not in dic and m - i >= 0:
		m -= i
		ans.append(i)
	if m - i < 0:
		break
print(len(ans))
print(*ans)


string = input().split()
n = int(string[0])
m = int(string[1])
types = list(map(int, input().split()))
types = set(types)
curr = 1
res = []
while m > 0:
	if m - curr < 0:
		break
	if curr not in types:
		m -= curr
		res.append(str(curr))
	curr += 1
print(len(res))
print(' '.join(res))


a = input().split()
n = int(a[0])
m = int(a[1])
d = {}
for i in input().split():
	d[int(i)] = 1
ans = []
cnt = 1
while m > 0:
	if m - cnt < 0:
		break
	if d.get(cnt) == None:
		ans.append(cnt)
		m -= cnt
	cnt += 1
print(len(ans))
for i in ans:
	print(i, ' ', sep='', end='')


(_, amount) = [int(x) for x in input().split()]
has = set([int(x) for x in input().split()])
i = 1
need = []
while i <= amount:
	if i not in has:
		need.append(i)
		amount -= i
	i += 1
print(len(need))
print(*need)


(n, m) = map(int, input().split())
l = [int(q) for q in input().split()]
l = set(map(int, l))
c = 1
ans = []
i = 0
while m - c >= 0:
	if c not in l:
		m -= c
		ans.append(c)
		c += 1
	else:
		c += 1
print(len(ans))
print(*ans)


(n, m) = map(int, input().split())
A = [int(j) for j in input().split()]
ans = []
A.sort()
j = 0
for i in range(1, 10 ** 9 + 1):
	if j < n and i == A[j]:
		j += 1
	else:
		m -= i
		if m < 0:
			break
		ans.append(i)
print(len(ans))
for i in ans:
	print(i, end=' ')


(n, m) = map(int, input().split())
a = set(map(int, input().split()))
ans = []
for i in range(1, 10 ** 9):
	if i not in a:
		if m < i:
			break
		m -= i
		ans.append(i)
print(len(ans))
print(*ans)


(n, m) = map(int, input().split())
arr = list(map(int, input().split()))
arr.sort()
(res, item, i) = ([], 1, 0)
while m >= item:
	if i < n and arr[i] == item:
		i += 1
		item += 1
	else:
		m -= item
		res.append(item)
		item += 1
print(len(res))
print(*res)


(X, Toys, Answer, i, MyDict) = (list(map(int, input().split())), list(map(int, input().split())), [], 1, {})
for j in Toys:
	MyDict[j] = 1
while i <= X[1]:
	if MyDict.get(i) == None:
		Answer.append(i)
		X[1] -= i
	i += 1
print(len(Answer))
print(*Answer)


(n, m) = map(int, input().split())
was = [False] * 200001
for x in map(int, input().split()):
	if x <= 200000:
		was[x] = True
res = []
for i in range(1, 10000000):
	if i > m:
		break
	if not was[i]:
		m -= i
		res.append(i)
print(len(res))
print(*res)


from bisect import bisect_left

def binary_search(a, x):
	i = bisect_left(a, x)
	if i < len(a) and a[i] == x:
		return i
	else:
		return -1
(n, m) = map(int, input().split())
alr = sorted(map(int, input().split()))
toy = 1
cnt = 0
ans = ''
while m > 0:
	if binary_search(alr, toy) == -1:
		if toy <= m:
			m -= toy
			cnt += 1
			ans += f'{toy} '
		else:
			break
	toy += 1
print(cnt)
print(ans)


(n, m) = map(int, input().split())
a = list(map(int, input().split()))
d = {}
for i in a:
	d[i] = True
c = 0
i = 1
ans = []
while c < m:
	if i not in d:
		if c + i <= m:
			c += i
			ans.append(i)
		else:
			break
	i += 1
print(len(ans))
print(*ans)


(n, m) = map(int, input().split())
(a, l) = (list(map(int, input().split())), [])
a.sort()
a += [0]
(t, i, j) = (1, 1, 0)
while t:
	if i != a[j]:
		if m >= i:
			m -= i
			l.append(i)
		else:
			t = 0
	else:
		j += 1
	i += 1
print(len(l))
print(*l)


(n, m) = list(map(int, input().split()))
l = list(map(int, input().split()))
d = {}
for i in l:
	d[i] = d.get(i, 0) + 1
res = []
for i in range(1, pow(10, 9) + 1):
	if i > m:
		break
	elif d.get(i, 0) == 0:
		d[i] = 1
		m -= i
		res.append(i)
	else:
		continue
print(len(res))
print(*res)


def f(a, b):
	return (a + b) * (b - a + 1) // 2
(n, m) = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
a.sort()
a.append(10 ** 9 + 1)
temp = 0
count = 0
for j in range(n + 1):
	if temp + 1 != a[j]:
		if m >= f(temp + 1, a[j] - 1):
			count += a[j] - temp - 1
			m = m - f(temp + 1, a[j] - 1)
		else:
			i = temp + 1
			while m >= i:
				m = m - i
				i += 1
				count += 1
			break
	temp = a[j]
print(count)
temp = 0
for j in range(n + 1):
	if count <= 0:
		break
	else:
		if temp + 1 != a[j]:
			for i in range(temp + 1, a[j]):
				if count > 0:
					print(i, end=' ')
					count -= 1
				else:
					break
		temp = a[j]


(a, b) = map(int, input().split())
l = set(map(int, input().split()))
l1 = []
i = 1
while i <= b:
	if i not in l:
		b -= i
		if b < 0:
			break
		else:
			l1 += [str(i)]
	i += 1
print(len(l1))
print(' '.join(l1))


(n, m) = map(int, input().split())
d = {}
l = list(map(int, input().split()))
for i in l:
	d[i] = 1
c = 1
toys = []
while m > 0:
	if c not in d:
		d[c] = 1
		m -= c
		if m < 0:
			break
		toys.append(c)
	c += 1
print(len(toys))
print(*toys)


from sys import stdin
(n, m) = [int(x) for x in stdin.readline().split()]
a = sorted([int(x) for x in stdin.readline().split()])
i = 0
res = []
for t in range(1, 1000000000):
	if t < a[i] and m >= t:
		res.append(t)
		m -= t
	elif t == a[i]:
		i += 1
	if m < t or i == len(a):
		break
if m > a[-1]:
	res.append(a[-1] + 1)
	m -= a[-1] + 1
	while m > res[-1]:
		m -= res[-1] + 1
		res.append(res[-1] + 1)
print(len(res))
print(' '.join([str(x) for x in res]))


[n, m] = [int(x) for x in input().split(' ')]
a = set([int(x) for x in input().split(' ')])
t = []
current = 0
for i in range(1, 1000000001):
	if i + current > m:
		break
	if i not in a:
		current += i
		t.append(str(i))
print(len(t))
print(' '.join(t))


(n, m) = map(int, input().split())
(A, T) = (set(map(int, input().split())), set())
for i in range(1, 200000):
	if i > m:
		break
	if i not in A:
		m -= i
		T.add(i)
print(len(T))
print(*T)


def main():
	(n, m) = map(int, input().split())
	toys = list(map(int, input().split()))
	toys.sort()
	ans = []
	total = 0
	for i in range(1, toys[0]):
		if total + i <= m:
			ans.append(i)
			total += i
		else:
			break
	for i in range(n - 1):
		for j in range(toys[i] + 1, toys[i + 1]):
			if total + j <= m:
				ans.append(j)
				total += j
			else:
				break
	if total < m:
		for i in range(toys[-1] + 1, 10 ** 9 + 1):
			if total + i <= m:
				ans.append(i)
				total += i
			else:
				break
	print(len(ans))
	for i in ans:
		print(i, end=' ')
main()


(n, k) = map(int, input().split())
l = set(list(map(int, input().split())))
temp = []
i = 1
while k > 0:
	if i not in l:
		temp.append(i)
		k -= i
	i += 1
if k < 0:
	print(len(temp) - 1)
	for i in range(len(temp) - 1):
		if i == len(temp) - 2:
			print(temp[i])
		else:
			print(temp[i], end=' ')
else:
	print(len(temp))
	for i in range(len(temp)):
		if i == len(temp) - 1:
			print(temp[i])
		else:
			print(temp[i], end=' ')


(n, m) = [int(x) for x in input().split()]
haveset = set()
a = [int(x) for x in input().split()]
for x in a:
	haveset.add(x)
answernum = 0
answertoys = []
spent = 0
for i in range(1, 1000000000 + 1):
	if not i in haveset:
		if spent + i > m:
			break
		else:
			answernum += 1
			spent += i
			answertoys.append(i)
print(answernum)
for x in answertoys:
	print(str(x), end=' ')


(x, y) = map(int, input().split())
a = list(map(int, input().split()))
i = 1
j = 0
lol = []
a.sort()
while y >= i:
	if j < len(a):
		if a[j] == i:
			j += 1
			i += 1
		else:
			lol.append(i)
			y -= i
			i += 1
	else:
		lol.append(i)
		y -= i
		i += 1
print(len(lol))
print(*lol)


(n, k) = map(int, input().split())
l = set(list(map(int, input().split())))
i = 1
d = []
c = 0
while i <= k:
	if i not in l:
		d.append(i)
		c = c + 1
		k = k - i
	i = i + 1
print(c)
print(*d)


(n, m) = map(int, input().split())
d = {}
for x in input().split():
	d[int(x)] = 1
num = 1
count = 0
toys = []
while m > 0:
	if m >= num and (not d.get(num)):
		toys.append(num)
		m -= num
		count += 1
	elif m < num:
		break
	num += 1
print(count)
for x in toys:
	print(x, end=' ')


(n, k) = map(int, input().split())
a = set(list(map(int, input().split())))
l = []
for i in range(1, 20000000):
	if i not in a and i <= k:
		l.append(i)
		k -= i
	if i > k:
		break
print(len(l))
print(*l)


import os
import sys
from math import *
from collections import *
from bisect import *
from io import BytesIO, IOBase
from fractions import *

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]
(n, m) = value()
a = set(array())
i = 1
ans = []
while m >= i:
	if i not in a:
		ans.append(i)
		m -= i
	i += 1
print(len(ans))
print(*ans)


(x, y) = map(int, input().split())
a = list(map(int, input().split()))
b = {}
c = 0
ans = []
a.sort()
for i in a:
	b[i] = 1
j = 1
while c <= y:
	try:
		if b[j]:
			j += 1
	except:
		ans.append(j)
		c += j
		j += 1
print(len(ans) - 1)
ans.pop()
for item in ans:
	print(item, end=' ')


(n, m) = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
a.sort()
i = 0
answer = []
current = 1
money = m
while m - current >= 0 and current <= money:
	if i < n and current == a[i]:
		i += 1
	else:
		m -= current
		answer.append(current)
	current += 1
print(len(answer))
print(*answer)


def re():
	return [int(x) for x in input().split(' ')]
[n, m] = re()
us = re()
us.sort()
ar = []
k = 0
i = 0
if len(us) == 0:
	i = 1
	while m > 0:
		if m - i >= 0 and i != us[0]:
			ar.append(str(i))
			m -= i
			i += 1
		else:
			i += 1
if us[0] > 1:
	i = 1
	while m > 0 and i != us[0]:
		if m - i >= 0:
			m -= i
			ar.append(str(i))
			i += 1
		else:
			break
i = 0
while i < len(us) - 1:
	for j in range(us[i] + 1, us[i + 1]):
		if m - j >= 0:
			ar.append(str(j))
			m -= j
		else:
			i = len(us)
			break
	i += 1
if m > 0 and m > us[-1]:
	i = us[-1] + 1
	while m > 0:
		if m - i >= 0:
			m -= i
			ar.append(str(i))
			i += 1
		else:
			break
print(len(ar))
print(' '.join(ar))


(n, m) = map(int, input().split())
a = list(map(int, input().split()))
a.append(10 ** 9)
a.sort()
i = 0
j = 0
l = []
while i < 10 ** 9 and j < n + 1 and (m >= i + 1):
	if i == a[j] - 1:
		i += 1
		j += 1
	elif i < a[j] - 1:
		l.append(i + 1)
		m -= 1 + i
		i += 1
print(len(l))
print(*l)


(n, k) = map(int, input().split(' '))
A = list(map(int, input().split(' ')))
res = []
length = 0
dict = {}
for i in A:
	dict[i] = 0
for i in range(1, 10 ** 9 + 1):
	if i not in dict:
		if k >= i:
			res.append(str(i))
			length += 1
			k -= i
		else:
			break
print(length)
print(' '.join(res))


(n, m) = [int(x) for x in input().split()]
arr = [int(x) for x in input().split()]
seen = set()
for x in arr:
	seen.add(x)
k = 0
ans = []
i = 1
while m >= i:
	if i in seen:
		i += 1
		continue
	m -= i
	ans.append(i)
	k += 1
	i += 1
print(str(k))
print(*ans)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
import math

def fact(x):
	if x == 0:
		return 1
	else:
		return x * fact(x - 1)

def lower_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] >= num:
			answer = middle
			end = middle - 1
		else:
			start = middle + 1
	return answer

def upper_bound(li, num):
	answer = -1
	start = 0
	end = len(li) - 1
	while start <= end:
		middle = (end + start) // 2
		if li[middle] <= num:
			answer = middle
			start = middle + 1
		else:
			end = middle - 1
	return answer

def abs(x):
	return x if x >= 0 else -x

def binary_search(li, val, lb, ub):
	ans = 0
	while lb <= ub:
		mid = (lb + ub) // 2
		if li[mid] > val:
			ub = mid - 1
		elif val > li[mid]:
			lb = mid + 1
		else:
			ans = 1
			break
	return ans
from math import *
(n, m) = map(int, input().split())
have = list(map(int, input().split()))
have.sort()
buy = []
i = 0
while True:
	i += 1
	if i > have[-1] or binary_search(have, i, 0, n - 1) == 0:
		if m < i:
			break
		else:
			m -= i
			buy.append(i)
print(len(buy))
if len(buy) != 0:
	print(*buy, end=' ')
	print('')


L = lambda : map(int, input().split())
(n, k) = L()
w = set(L())
num = 1
ans = []
while num <= k:
	if num not in w:
		ans.append(str(num))
		k -= num
	num += 1
print(len(ans))
print(' '.join(ans))


import sys
money = int(sys.stdin.readline().strip().split(' ')[1])
maxmoney = money
toysStr = sys.stdin.readline().strip().split(' ')
toys = []
for i in toysStr:
	toys.append(int(i))
toys.sort(reverse=True)
buy = []
smallest = toys.pop()
for i in range(1, maxmoney + 1):
	if i == smallest:
		if len(toys) > 0:
			smallest = toys.pop()
	else:
		if i > money:
			break
		money = money - i
		buy.append(str(i))
print(len(buy))
print(' '.join(buy))


s = input().split()
n = int(s[0])
m = int(s[1])
old_toys = {int(i) for i in input().split()}
u = 1
res = ''
k = 0
while u <= m:
	if u in old_toys:
		u = u + 1
	else:
		res = res + str(u) + ' '
		m = m - u
		u = u + 1
		k = k + 1
print(k)
print(res)


cnt = lambda s, x: s.count(x)
ii = lambda : int(input())
si = lambda : input()
f = lambda : map(int, input().split())
dgl = lambda : list(map(int, input()))
il = lambda : list(map(int, input().split()))
import bisect
(n, k) = f()
l = sorted(il())
i = 1
c = 0
s = []
sm = 0
while sm + i <= k:
	x = bisect.bisect_left(l, i)
	if x == n or l[x] != i:
		c += 1
		sm += i
		s.append(i)
	i += 1
print(c)
print(*s)


int_inp = lambda : int(input())
strng = lambda : input().strip()
strl = lambda : list(input().strip())
mul = lambda : map(int, input().strip().split())
mulf = lambda : map(float, input().strip().split())
seq = lambda : list(map(int, input().strip().split()))
import math
from collections import Counter, defaultdict
(n, m) = map(int, input().split())
s = set(map(int, input().split()))
res = []
i = 1
while m >= i:
	if i not in s:
		m -= i
		s.add(i)
		res.append(i)
	i += 1
print(len(res))
print(' '.join(map(str, res)))


class StdIO:

	def read_int(self):
		return int(self.read_string())

	def read_ints(self, sep=None):
		return [int(i) for i in self.read_strings(sep)]

	def read_float(self):
		return float(self.read_string())

	def read_floats(self, sep=None):
		return [float(i) for i in self.read_strings(sep)]

	def read_string(self):
		return input()

	def read_strings(self, sep=None):
		return self.read_string().split(sep)
io = StdIO()

def main():
	(n, m) = io.read_ints()
	a = io.read_ints()
	a.sort()
	has = set()
	for ai in a:
		has.add(ai)
	t = []
	mu = 0
	for i in range(1, a[0]):
		if mu + i > m:
			break
		t.append(i)
		mu += i
	for i in range(a[0], a[-1]):
		if mu + i > m:
			break
		if i not in has:
			t.append(i)
			mu += i
	for i in range(a[-1] + 1, 10 ** 9):
		if mu + i > m:
			break
		t.append(i)
		mu += i
	print(len(t))
	for ti in t:
		print(ti, end=' ')
main()


(n, m) = map(int, input().split())
set1 = set(map(int, input().split()))
ans = set()
ans_sum = 0
for i in range(1, 10 ** 9 + 1):
	if i not in set1:
		if ans_sum + i <= m:
			ans.add(i)
			ans_sum += i
		else:
			break
print(len(ans))
print(*ans)


(n, m) = map(int, input().split())
a = sorted(list(map(int, input().split())))
p = 0
b = []
for i in range(1, 1000000000):
	if p < n and i == a[p]:
		p += 1
		continue
	if i > m:
		break
	m -= i
	b.append(i)
print(len(b))
for x in b:
	print(x, end=' ')


(n, m) = map(int, input().split())
a = set(map(int, input().split()))
i = 1
ans = []
while m > 0 and i <= m:
	if i not in a:
		a.add(i)
		ans.append(i)
		m -= i
	i += 1
print(len(ans))
print(*ans)


(n, m) = [int(x) for x in input().split()]
toys = {int(x) for x in input().split()}
new_toys = []
for i in range(1, 10 ** 9):
	if m - i < 0:
		break
	if not i in toys:
		m -= i
		new_toys.append(i)
print(len(new_toys))
print(' '.join(map(str, new_toys)))


from sys import stdin
input = stdin.readline
T = 1
for t in range(1, T + 1):
	(n, k) = map(int, input().split())
	_input = list(map(int, input().split()))
	ans = []
	_sum = 0
	_input.sort()
	for i in range(len(_input)):
		if i == 0:
			for j in range(1, _input[i]):
				_sum += j
				if _sum <= k:
					ans.append(j)
				else:
					break
		else:
			for j in range(_input[i - 1] + 1, _input[i]):
				_sum += j
				if _sum <= k:
					ans.append(j)
				else:
					break
	if k > 0:
		for i in range(_input[i] + 1, _input[i] + 1000000):
			_sum += i
			if _sum <= k:
				ans.append(i)
			else:
				break
	print(len(ans))
	for i in ans:
		print(i, end=' ')


def main():
	(n, m) = map(int, input().split())
	bs = tuple(map(int, input().split()))
	max_n = 3 * 10 ** 6
	cs = list(range(1, max_n))
	for b in bs:
		if b < max_n - 1:
			cs[b - 1] = 0
	i = 0
	res = []
	while cs[i] <= m:
		if cs[i] != 0:
			m -= cs[i]
			res.append(cs[i])
		i += 1
	print(len(res))
	print(' '.join(map(str, res)))
main()


(n, m) = map(int, input().split())
used = set(map(int, input().split()))
cur = 1
ans = []
while cur <= m:
	if not cur in used:
		ans += [cur]
		m -= cur
	cur += 1
print(len(ans))
print(*ans)


from collections import Counter
import string
import math
import sys

def array_int():
	return [int(i) for i in sys.stdin.readline().split()]

def vary(number_of_variables):
	if number_of_variables == 1:
		return int(sys.stdin.readline())
	if number_of_variables >= 2:
		return map(int, sys.stdin.readline().split())

def makedict(var):
	return dict(Counter(var))
mod = 100000007
(n, m) = vary(2)
sumt = 0
a = array_int()
pt = set(a)
arr = []
i = 1
while i <= m:
	if i not in pt:
		m -= i
		arr.append(str(i))
	i += 1
print(str(len(arr)) + '\n' + ' '.join(arr))


n_m = input().split()
N = int(n_m[0])
money = int(n_m[1])
tanya_toys = sorted((int(toy) for toy in input().split()))
new_toys = []
toy_index = 1
tanya_toy_index = 0
while True:
	if money >= toy_index:
		if tanya_toy_index < len(tanya_toys) and tanya_toys[tanya_toy_index] == toy_index:
			tanya_toy_index += 1
			toy_index += 1
		else:
			money -= toy_index
			new_toys.append(toy_index)
			toy_index += 1
	else:
		break
print(len(new_toys))
for toy in new_toys:
	print(toy, end=' ')
print()


(n, k) = map(int, input().rstrip().split(' '))
l = list(map(int, input().rstrip().split(' ')))
l.sort()
r = []
c = 0
j = 1
i = 0
while k >= 0:
	if i >= n:
		i = n - 1
	if j == l[i]:
		i = i + 1
	else:
		r.append(j)
		k = k - j
		c = c + 1
	j += 1
print(c - 1)
print(*r[:-1])


(n, m) = [int(x) for x in input().split()]
l = [int(x) for x in input().split()]
l.sort()
i = 1
c = 0
j = 0
a = []
while c + i <= m:
	if i != l[j]:
		c += i
		a.append(i)
	elif j + 1 < len(l):
		j += 1
	i += 1
print(len(a))
for x in a:
	print(x, end=' ')


(n, m) = map(int, input().split())
toys = set(map(int, input().split()))
i = 1
res = []
while m - i >= 0:
	if i not in toys:
		m -= i
		res.append(i)
	i += 1
print(len(res))
print(' '.join(map(str, res)))


(n, m) = (int(z) for z in input().split())
s = [int(z) for z in input().split()]
t = set(s)
q = 0
i = 1
res = []
while q + i <= m and i < 1000000000:
	if i not in t:
		q += i
		res.append(str(i))
	i += 1
print(len(res))
print(' '.join(res))


(a, m) = map(int, input().split())
l = set(map(int, input().split()))
p = []
s = m
t = pow(10, 9)
for i in range(1, s + 1):
	if i not in l:
		if i <= m:
			m = m - i
			p.append(i)
	if i > m:
		break
print(len(p))
print(*p)


from sys import stdin, stdout, setrecursionlimit
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush, nlargest
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm, accumulate
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
import copy
import time
setrecursionlimit(10 ** 9)
starttime = time.time()
mod = int(pow(10, 9) + 7)
mod2 = 998244353

def data():
	return input()

def num():
	return int(input())

def L():
	return list(sp())

def LF():
	return list(spf())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def spf():
	return map(int, input.readline().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]

def pmat(A):
	for ele in A:
		print(*ele, end='\n')

def pmat2(A):
	for ele in A:
		for j in ele:
			print(j, end='')
		print()

def iseven(n):
	return n % 2 == 0

def seive(r):
	prime = [1 for i in range(r + 1)]
	prime[0] = 0
	prime[1] = 0
	for i in range(r + 1):
		if prime[i]:
			for j in range(2 * i, r + 1, i):
				prime[j] = 0
	return prime
(n, m) = sp()
a = set(L())
ans = []
for i in range(1, m + 1):
	if m > 0 and m >= i:
		if i not in a:
			ans.append(i)
			m -= i
	else:
		break
print(len(ans))
print(*ans)
endtime = time.time()


def main():
	(n, m) = map(int, input().split())
	mas = list(map(int, input().split()))
	mas.sort()
	mas.append(int(1000000000.0))
	ans = 0
	res = []
	ind = 0
	for i in range(1, int(1000000000.0)):
		if m < i:
			break
		if mas[ind] == i:
			ind += 1
		else:
			ans += 1
			m -= i
			res.append(i)
	print(ans)
	print(*res)
main()


from math import *
from copy import *
from string import *
from random import *
from sys import stdin
from sys import maxsize
from operator import *
from itertools import *
from collections import Counter
import math

def bin1(l, r, k, t, b, val, ans):
	if l > r:
		return ans
	else:
		mid = (l + r) // 2
		v = k ** mid
		if v == val:
			return v
		elif v > val:
			ans = mid
			return bin1(mid + 1, r, k, t, b, val, ans)
		else:
			return bin1(l, mid - 1, k, t, b, val, ans)

def bin2(l, r, k, t, b, val, ans):
	if l > r:
		return ans
	else:
		mid = (l + r) // 2
		v = t * k ** mid + b * mid
		if v == val:
			return v
		elif v > val:
			ans = mid
			return bin2(l, mid - 1, k, t, b, val, ans)
		else:
			return bin2(mid + 1, r, k, t, b, val, ans)

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	l = []
	for i in range(2, n + 1):
		if prime[i]:
			l.append(i)
	return l

def bin(l, r, ll, val):
	if l > r:
		return -1
	else:
		mid = (l + r) // 2
		if val >= ll[mid][0] and val <= ll[mid][1]:
			return mid
		elif val < ll[mid][0]:
			return bin(l, mid - 1, ll, val)
		else:
			return bin(mid + 1, r, ll, val)

def deci(n):
	s = ''
	while n != 0:
		if n % 2 == 0:
			n = n // 2
			s = '0' + s
		else:
			n = n // 2
			s = '1' + s
	return s

def diff(s1, s2):
	if len(s1) < len(s2):
		v = len(s1)
		while v != len(s2):
			s1 = '0' + s1
			v = v + 1
	else:
		v = len(s2)
		while v != len(s1):
			s2 = '0' + s2
			v = v + 1
	c = 0
	for i in range(len(s1)):
		if s1[i:i + 1] != s2[i:i + 1]:
			c = c + 1
	return c
from sys import stdin, stdout

def fac(a, b):
	v = a
	while a != b:
		v *= a - 1
		a = a - 1
	return v

def bino(l, r, n):
	if l > r:
		return -1
	else:
		mid = (l + r) // 2
		val1 = math.log(n / mid + 1, 2)
		val2 = int(val1)
		if val1 == val2:
			return val1
		elif val1 < 1.0:
			return bino(l, mid - 1, n)
		else:
			return bino(mid + 1, r, n)

def binary(l, r, ll, val, ans):
	if l > r:
		return ans
	else:
		mid = (l + r) // 2
		if val % ll[mid] == 0:
			ans = ll[mid]
			return binary(l, mid - 1, ll, val, ans)
		else:
			return binary(l, mid - 1, ll, val, ans)

def odd(n, ans, s):
	if n % 2 != 0 or n in s:
		return ans
	else:
		s.add(n)
		return odd(n // 2, ans + 1, s)
(n, m) = map(int, input().split(' '))
l = list(map(int, input().split(' ')))
l.sort()
count = 0
ans = []
for i in range(1, l[0]):
	if m >= i:
		count += 1
		ans.append(i)
		m -= i
	else:
		break
if m > 0:
	boo = True
	for i in range(n):
		if i != n - 1:
			i1 = l[i]
			i2 = l[i + 1]
			i1 += 1
			while i1 < i2:
				if m >= i1:
					m -= i1
					count += 1
					ans.append(i1)
					i1 += 1
				else:
					boo = False
					break
		if not boo:
			break
	if m > 0:
		val = l[n - 1] + 1
		while m > 0:
			if m >= val:
				m -= val
				ans.append(val)
				val += 1
				count += 1
			else:
				break
		print(count)
		print(*ans)
	else:
		print(count)
		print(*ans)
else:
	print(count)
	print(*ans)


(n, m) = map(int, input().split())
l = set(map(int, input().split()))
ans = []
i = 1
while m >= i:
	if i not in l:
		ans.append(i)
		m -= i
		l.add(i)
	i += 1
print(len(ans))
print(*ans)


import sys
input = sys.stdin.readline
(i_zabawek, hajs) = map(int, input().split())
zabawki = set(list(map(int, input().split())))
zakupy = []
x = 1
len_ = 0
while hajs >= x:
	if not x in zabawki:
		len_ += 1
		zakupy.append(x)
		hajs -= x
	x += 1
print(len_)
print(*zakupy)


(n, m) = map(int, input().split())
xs = [int(x) for x in input().split()]
xs.sort()
j = 0
toys = []
for i in range(1, 1000000000):
	if j < len(xs) and i == xs[j]:
		j += 1
		continue
	if m < i:
		break
	m -= i
	toys.append(i)
print(len(toys))
for t in toys:
	print(t, end=' ')
print()


(n, m) = list(map(int, input().split()))
arr = list(map(int, input().split()))
arr.sort()
temp = []
ans = [False] * (2 * 10 ** 5)
for i in range(n):
	if arr[i] >= len(ans):
		pass
	else:
		ans[arr[i]] = True
for i in range(1, len(ans)):
	if ans[i] == False:
		m -= i
		if m >= 0:
			temp.append(i)
		else:
			break
print(len(temp))
print(*temp)


(n, m) = map(int, input().split())
arr = list(map(int, input().split()))
check = [False] * 2000101
for x in arr:
	if x < 2000101:
		check[x] = True
(t, res) = (1, 0)
bght = []
while m > 0 and t <= m:
	if check[t] == False:
		res += 1
		check[t] = True
		bght.append(t)
		m -= t
	t += 1
print(res)
print(' '.join(map(str, bght)))


(n, m) = map(int, input().split())
a = set(map(int, input().split()))
li = list()
p = 1
t = 0
while t < m:
	if p not in a:
		t = t + p
		if t > m:
			break
		li.append(p)
	p += 1
print(len(li))
print(' '.join(map(str, li)))


string = input()
numbers = string.split()
a = int(numbers[1])
string = input()
numbers = list(map(int, string.split()))
l = len(numbers)
numbers.sort()
toys = []
b = 0
c = 0
n = 0
while c < len(numbers):
	b += 1
	d = numbers[c]
	if b < d:
		n += b
		if n > a:
			n -= b
			break
		toys.append(b)
	else:
		c += 1
b = d
while n < a:
	b += 1
	n += b
	toys.append(b)
if n > a:
	del toys[-1]
print(len(toys))
print(' '.join(map(str, toys)))


(n, m) = list(map(int, input().rstrip().split()))
a = set(list(map(int, input().rstrip().split())))
i = 1
t = []
while i <= m:
	if i not in a:
		t.append(i)
		m -= i
	i += 1
print(len(t))
print(*t)


def read_array():
	return [int(x) for x in input().split()]

def read_int():
	return int(input())

def solve():
	(n, m) = read_array()
	a = read_array()
	vis = set(a)
	i = 1
	res = []
	while m > 0:
		if i not in vis:
			if m - i < 0:
				break
			res.append(i)
			m -= i
		i += 1
	print(len(res))
	for x in res:
		print(x, end=' ')
t = 1
while t > 0:
	solve()
	t -= 1


(n, m) = map(int, input().split())
a = sorted(list(map(int, input().split())))
ans = []
p = 0
s = 0
for i in range(1000000):
	while p < n and a[p] < i:
		p += 1
	if p < n and a[p] == i:
		continue
	if i > 0 and s + i <= m:
		ans.append(i)
		s += i
	if s + i > m:
		break
q = len(ans)
print(q)
for i in range(q):
	print(ans[i], end=' ')


(n, m) = map(int, input().split())
alr = sorted(map(int, input().split()))
i = 0
toy = 1
cnt = 0
ans = ''
while m > 0:
	if i < n and alr[i] != toy:
		if toy <= m:
			cnt += 1
			ans += f'{toy} '
			m -= toy
			toy += 1
		else:
			break
	elif i >= n:
		if toy <= m:
			cnt += 1
			ans += f'{toy} '
			m -= toy
			toy += 1
		else:
			break
	else:
		toy += 1
		i += 1
print(cnt)
print(ans)


(n, m) = map(int, input().split())
a = list(map(int, input().split()))
k = [True for i in range(2 * 10 ** 5)]
for elem in a:
	if elem < 2 * 10 ** 5:
		k[elem] = False
count = 0
res = []
for i in range(1, 2 * 10 ** 5):
	if k[i] == False:
		continue
	elif m - i >= 0:
		m -= i
		count += 1
		res.append(i)
	else:
		break
print(count)
print(' '.join(map(str, res)))


(n, m) = map(int, input().split())
from math import sqrt
a = [int(s) for s in input().split()]
a.sort()
j = 0
sum = 0
s = ''
k = 0
for i in range(1, m):
	if i == a[j] and j < n - 1:
		j += 1
	elif i != a[j]:
		sum += i
		if sum > m:
			break
		else:
			if k == 0:
				s += str(i)
			else:
				s += ' ' + str(i)
			k += 1
if m == 1 and a[0] != 1:
	k = 1
	s = 1
print(k)
print(s)


(n, m) = map(int, input().split())
l = [int(x) for x in input().split()]
l = set(l)
sum = 0
temp = []
c = 0
for i in range(1, 10000000000000000):
	if i not in l:
		sum += i
		if sum > m:
			break
		else:
			c += 1
			temp.append(i)
print(c)
for i in temp:
	print(i, end=' ')


from collections import deque

def sum_fron_n_to_m(n, m):
	sum = int(m + n) * int(m - n + 1) / 2
	return int(sum)
tmp = input().rstrip('\n')
(n, m) = tmp.split(' ')
m = int(m)
tmp = input().rstrip('\n')
has = tmp.split(' ')
has = list(map(lambda x: int(x), has))
has.sort(reverse=True)
now = 0
spent = 0
ans = []
while spent < m and has:
	i = int(has.pop())
	if i - now < 2:
		now = i
	else:
		potential = sum_fron_n_to_m(now + 1, i - 1)
		if spent + potential <= m:
			for x in range(now + 1, i):
				ans.append(x)
			spent += potential
			now = i
		else:
			while spent < m:
				for x in range(now + 1, i):
					now = x
					if spent + x <= m:
						ans.append(x)
						spent += x
					else:
						spent = m
						break
if not has:
	now += 1
	while spent + now <= m:
		ans.append(now)
		spent += now
		now += 1
print(len(ans))
print(' '.join(list(map(lambda x: str(x), ans))))


(n, k) = map(int, input().split())
arr = set(map(int, input().split()))
res = []
i = 1
while k >= i:
	if i not in arr:
		res.append(i)
		k -= i
		arr.add(i)
	i += 1
print(len(res))
print(*res)


(n, m) = map(int, input().split())
arr = list(map(int, input().split()))
arr.sort()
ans = []
cc = 1
temp = 0
flag = False
while cc < arr[0]:
	if temp + cc > m:
		flag = True
		break
	elif cc + temp == m:
		flag = True
		ans.append(cc)
		break
	else:
		ans.append(cc)
		temp += cc
		cc += 1
for i in range(1, n):
	if flag:
		break
	for j in range(arr[i - 1] + 1, arr[i]):
		if temp + j > m:
			flag = True
			break
		elif temp + j == m:
			flag = True
			ans.append(j)
			break
		else:
			temp += j
			ans.append(j)
		if flag:
			break
	if flag:
		break
cc = arr[-1] + 1
while temp < m:
	if temp + cc < m:
		ans.append(cc)
		temp = temp + cc
		cc += 1
	elif temp + cc == m:
		ans.append(cc)
		break
	else:
		break
print(len(ans))
for i in ans:
	print(i, end=' ')
print()


(n, m) = map(int, input().split())
xs = list(map(int, input().split()))
ys = []
t = 0

def ans():
	print(len(ys))
	print(' '.join(list(map(str, ys))))
	exit()
xs.append(0)
xs.sort()
for i in range(n):
	for j in range(xs[i] + 1, xs[i + 1]):
		t += j
		if t <= m:
			ys.append(j)
		else:
			ans()
for h in range(xs[-1] + 1, 1000000001):
	t += h
	if t <= m:
		ys.append(h)
	else:
		ans()
ans()


from sys import stdin, stderr

def readInts():
	return map(int, stdin.readline().strip().split())

def print_err(*args, **kwargs):
	print(*args, file=stderr, **kwargs)

def solve(m, ns):
	v = 1
	out = []
	ns = set(ns)
	c = 0
	tot = 0
	while tot + v <= m:
		if v not in ns:
			out.append(v)
			c += 1
			tot += v
		v += 1
	return (c, out)

def run():
	(_, m) = readInts()
	ns = readInts()
	(c, out) = solve(m, ns)
	print(c)
	print(' '.join(map(str, out)))
run()


from math import sqrt, floor
from itertools import takewhile
inputs1st = list(map(int, input().split(' ')))
inputs2nd = list(map(int, input().split(' ')))

def solve(bourles, xs):
	ys = sorted(xs)
	index1 = 0
	index2 = 0
	ans = [0 for _ in range(50000)]
	for i in range(1, 150000):
		if i > bourles:
			break
		if len(ys) - index1 > 0 and i == ys[index1]:
			index1 += 1
			continue
		ans[index2] = i
		index2 += 1
		bourles -= i
	return list(takewhile(lambda x: x != 0, ans))
ans = solve(inputs1st[1], inputs2nd)
print(len(ans))
print(' '.join(list(map(str, ans))))


import time
(n, m) = (int(i) for i in input().split())
a = sorted([int(i) for i in input().split()])
start = time.time()
acc = 0
ans = []
j = 0
sum = 0
for i in range(1, 1000000001):
	if j < n:
		if i == a[j]:
			j += 1
			continue
	if sum + i > m:
		break
	sum += i
	acc += 1
	ans.append(i)
print(acc)
for i in range(acc):
	print(ans[i], end=' ')
print()


def main():
	(_, k) = map(int, input().split())
	nums = map(int, input().split())
	toys = []
	nums = set(nums)
	for i in range(1, 1000000000):
		if k >= i:
			if i not in nums:
				toys.append(i)
				k -= i
		else:
			break
	print(len(toys))
	print(' '.join(map(str, toys)))
main()


def solve(n, m, arr):
	st = set(arr)
	ans = list()
	i = 1
	while m >= i:
		if i not in st:
			ans.append(i)
			m -= i
		i += 1
	return ans
(n, m) = map(int, input().split())
arr = list(map(int, input().split()))
ans = solve(n, m, arr)
print(len(ans))
print(' '.join(map(str, ans)))


(n, m) = list(map(int, input().split()))
a = list(map(int, input().split()))
a.sort()
igr = []
a1 = 0
for item in a:
	if item - a1 == 1:
		a1 = item
	elif (a1 + item) * (item - a1 - 1) // 2 > m:
		kolvo = int(-a1 - 0.5 + pow(4 * a1 * a1 + 4 * a1 + 1 + 8 * m, 1 / 2) / 2)
		m = 0
		for i in range(a1 + 1, a1 + kolvo + 1):
			igr.append(i)
		break
	else:
		m -= (a1 + item) * (item - a1 - 1) // 2
		for i in range(a1 + 1, item):
			igr.append(i)
		a1 = item
		if m <= item:
			break
if igr:
	a1 = max(igr[-1], a[-1])
else:
	a1 = a[-1]
if m > a1:
	kolvo = int(-a1 - 0.5 + pow(4 * a1 * a1 + 4 * a1 + 1 + 8 * m, 1 / 2) / 2)
	for i in range(a1 + 1, a1 + kolvo + 1):
		igr.append(i)
print(len(igr))
print(' '.join((str(i) for i in igr)))


(n, m) = map(int, input().split())
inp = list(map(int, input().split()))
inp = set(inp)
count = 1
st = [0] * 100000
a = 0
while m - count >= 0:
	if not count in inp:
		st[a] = count
		a += 1
		m -= count
		inp.add(count)
	count += 1
print(a)
for i in range(a):
	print(st[i], end=' ')


from math import *
from collections import *
from random import *
from bisect import *
import sys
input = sys.stdin.readline
t = 1
while t:
	t -= 1
	(n, m) = map(int, input().split())
	a = list(map(int, input().split()))
	a = set(a)
	r = []
	for i in range(1, 1000000000 + 1):
		if i in a:
			continue
		if m - i >= 0:
			r.append(i)
			m -= i
		else:
			break
	print(len(r))
	print(*r)


(n, m) = [int(j) for j in input().split()]
a = [int(j) for j in input().split()]
s = set()
for i in range(n):
	s.add(a[i])
i = 1
k = []
while True:
	if m >= i:
		if i not in s:
			k.append(i)
			m -= i
	else:
		break
	i += 1
print(len(k))
print(*k)


(n, m) = map(int, input().split())
l = set(list(map(int, input().split())))
cost = 0
ans = []
for i in range(1, 500000):
	if i not in l:
		cost += i
		if cost > m:
			break
		else:
			ans.append(i)
print(len(ans))
for i in ans:
	print(i, end=' ')


(n, m) = list(map(int, input().split()))
a = set(map(int, input().split()))
s = m
al = len(a)
b = []
for i in range(1, m + 1):
	if i not in a:
		if i <= s:
			b.append(i)
			s -= i
	if i > s:
		break
print(len(b))
print(*b)


read = lambda : map(int, input().split())
(n, m) = read()
a = set(read())
t = []
for i in range(1, m + 1):
	if m < i:
		break
	if i not in a:
		t.append(i)
		m -= i
print(len(t))
print(*t)


(n, m) = map(int, input().split())
a = list(map(int, input().split()))
a = sorted(a)
k = 1
ans = []
for i in range(n):
	while k < a[i] and k <= m:
		ans.append(k)
		m -= k
		k += 1
	k += 1
while k <= m:
	ans.append(k)
	m -= k
	k += 1
print(len(ans))
print(*ans)


import sys
(n, m) = map(int, sys.stdin.readline().split())
a = set(map(int, sys.stdin.readline().split()))
ans = set()
sum_ans = 0
for i in range(1, m + 1):
	if i not in a:
		if sum_ans + i > m:
			break
		else:
			ans.add(i)
			sum_ans += i
print(len(ans))
print(' '.join([str(i) for i in ans]))


(n, m) = map(int, input().split())
est = {int(i): None for i in input().split()}
s = 0
game = []
for i in range(1, m + 1):
	if i not in est:
		if s + i <= m:
			game.append(i)
			s += i
		else:
			break
print(len(game))
for j in game:
	print(j, end=' ')


(n, m) = [int(s) for s in input().split(' ')]
a = [int(s) for s in input().split(' ')]
a.sort()
i = 0
cur = 1
res = []
while m >= cur:
	while i < n and a[i] < cur:
		i += 1
	if i >= n or cur < a[i]:
		res.append(cur)
		m -= cur
	cur += 1
print(len(res))
if len(res) > 0:
	print(' '.join(map(str, res)))


(n, m) = list(map(int, input().split()))
a = list(map(int, input().split()))
a.sort()
igr = []
a1 = 0
fl = False
for item in a:
	for j in range(a1 + 1, item):
		if m >= j:
			igr.append(j)
			m -= j
		else:
			fl = True
			break
	a1 = item
	if fl:
		break
for j in range(a1 + 1, 10000000000):
	if m >= j:
		igr.append(j)
		m -= j
	else:
		break
print(len(igr))
print(' '.join((str(i) for i in igr)))


(n, m) = map(int, input().split())
ls = sorted(list(map(int, input().split())))
(su, j, arr) = (0, 0, [])
for i in range(1, m + 1):
	if j < n and i == ls[j]:
		j += 1
		continue
	su = su + i
	if su > m:
		break
	arr.append(i)
print(len(arr))
for j in arr:
	print(j, end=' ')


(n, m) = map(int, input().split())
s = set(map(int, input().split()))
res = []
i = 1
while m >= i:
	if i not in s:
		m -= i
		s.add(i)
		res.append(i)
	i += 1
print(len(res))
print(' '.join(map(str, res)))