#include <bits/stdc++.h>
using namespace std;
const int MX = 1e9 + 2;
vector<int> v;
map<int, int> has;
int main() {
  ios::sync_with_stdio(false);
  int n, m, sum = 0;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    has[x] = 1;
  }
  for (int i = 1; i <= MX; i++) {
    if (!has[i]) {
      if (i + sum <= m) {
        v.push_back(i);
        sum += i;
      } else {
        cout << v.size() << endl;
        for (int i = 0; i < v.size(); i++) {
          cout << v[i] << " ";
        }
        exit(0);
      }
    }
  }
}
