#include <bits/stdc++.h>
using namespace std;
void init() {
  ios::sync_with_stdio(0);
  cin.tie(0);
}
int toys[100005];
vector<int> buy;
void input(int n) {
  for (int i = 0; i < n; i++) cin >> toys[i];
}
int getAns(int n, int m) {
  int now = 1;
  int idx = 0;
  int ans = 0;
  while (m - now >= 0) {
    if (toys[idx] == now) {
      idx++;
      now++;
      continue;
    }
    buy.push_back(now);
    m -= now;
    ans++;
    now++;
  }
  return ans;
}
void output() {
  for (auto i : buy) cout << i << " ";
  cout << "\n";
}
int main() {
  init();
  int n, m;
  cin >> n >> m;
  input(n);
  sort(toys, toys + n);
  cout << getAns(n, m) << "\n";
  output();
}
