#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
const long long INF = 9999999999999;
const int mod = 1e9 + 7;
int a[maxn];
int b[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  int flag = 0;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  sort(a + 1, a + n + 1);
  int cnt = 0;
  a[0] = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] - a[i - 1] != 1) {
      int t = a[i - 1] + 1;
      while (t != a[i]) {
        if (m - t >= 0) {
          m -= t;
          b[cnt++] = t;
          t++;
        } else {
          flag = 1;
          break;
        }
      }
    }
    if (flag == 1) break;
  }
  if (m != 0) {
    int t = a[n] + 1;
    while (m > 0) {
      m = m - t;
      if (m >= 0) b[cnt++] = t;
      t++;
    }
  }
  cout << cnt << endl;
  if (cnt != 0) {
    cnt--;
    for (int i = 0; i < cnt; i++) cout << b[i] << " ";
    cout << b[cnt] << endl;
  }
  return 0;
}
