#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  a.push_back(0);
  vector<int> buy;
  int res = 0;
  int cost = 0;
  int cur_cost = 1;
  int i = 0;
  while (cur_cost + cost <= m) {
    if (a[i] != cur_cost) {
      res++;
      cost += cur_cost;
      buy.push_back(cur_cost);
      cur_cost++;
    } else {
      cur_cost++;
      i++;
    }
  }
  cout << res << endl;
  for (int i = 0; i < buy.size(); i++) {
    cout << buy[i] << " ";
  }
}
