#include <bits/stdc++.h>
using namespace std;
int n, m, a[100005];
long long sum, cnt;
vector<int> v;
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  sort(a, a + n);
  for (int i = 1; i <= 1000000000; i++) {
    if (!binary_search(a, a + n, i)) {
      cnt++;
      sum += i;
      v.push_back(i);
      if (sum >= m) {
        if (sum > m) {
          cnt--;
        }
        printf("%d\n", cnt);
        for (int j = 0; j < cnt; j++) {
          printf("%d ", v[j]);
        }
        printf("\n");
        return 0;
      }
    }
  }
}
