#include <bits/stdc++.h>
using namespace std;
void read() {
  freopen("in.txt", "r", stdin);
  freopen("out.txt", "w", stdout);
}
bool voi(char c) {
  return (c == 'a' || c == 'e' || c == 'i' || c == 'y' || c == 'o' || c == 'u');
}
long long log_pow(long long b, long long p) {
  if (p == 0) return 1;
  if (p == 1) return b;
  if (p % 2) return b * log_pow(b, p - 1);
  long long r = log_pow(b, p / 2);
  return r * r;
}
int d5l_i() {
  int x;
  scanf("%d", &x);
  return x;
}
long long d5l_l() {
  long long x;
  scanf("%lld", &x);
  return x;
}
char d5l_c() {
  char x;
  scanf("%c", &x);
  return x;
}
long long fact(int n) {
  long long fc = 1;
  for (int i = 2; i <= n; i++) fc *= i;
  return fc;
}
int len(long long n) {
  int c = 0;
  while (n) {
    n /= 2;
    c++;
  }
  return c;
}
bool why(int a, int b, int c) {
  return ((long long)a + b > c && (long long)c + b > a && (long long)c + a > b);
}
int a[100005];
long long ans;
int main() {
  int n = d5l_i(), m = d5l_i();
  for (int i = 0; i < n; i++) a[i] = d5l_i();
  sort(a, a + n);
  vector<int> v;
  bool flag = false, ops = false;
  for (int i = 1; i < a[0]; i++) {
    if (ans + i > m) {
      ops = true;
      break;
    }
    ans += i;
    v.push_back(i);
  }
  if (!ops)
    for (int i = 0; i < n - 1; i++) {
      for (int j = a[i] + 1; j < a[i + 1]; j++) {
        if (ans + j > m) {
          flag = true;
          break;
        }
        ans += j;
        v.push_back(j);
      }
      if (flag) break;
    }
  if (!flag && !ops)
    for (int i = a[n - 1] + 1; i <= 1e9; i++) {
      if (ans + i > m) break;
      ans += i;
      v.push_back(i);
    }
  printf("%d\n", v.size());
  for (int i = 0; i < v.size(); i++) printf("%d ", v[i]);
}
