#include <bits/stdc++.h>
using namespace std;
int n, m, i, s, num, cnt, j;
int main() {
  map<int, int> a, b;
  cin >> n >> m;
  for (; i < n; i++) {
    cin >> num;
    a[num]++;
  }
  for (i = 1; i <= pow(10, 7); i++)
    if (a[i] == 0) {
      if (s + i > m)
        break;
      else {
        b[cnt] = i;
        s += i;
        cnt++;
      }
    }
  cout << cnt << endl;
  for (j = 0; j < cnt; j++)
    if (j == cnt - 1)
      cout << b[j];
    else
      cout << b[j] << " ";
  return 0;
}
