#include <bits/stdc++.h>
using namespace std;
long long arr[1000005];
vector<int> val;
int main() {
  int n;
  long long a;
  scanf("%d %lld", &n, &a);
  for (int i = 0; i < n; i++) {
    scanf("%lld", &arr[i]);
  }
  sort(arr, arr + n);
  int cou = 0;
  int cur = 0;
  int flag = 0;
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    for (int j = (cur + 1); j < arr[i]; j++) {
      if ((sum + j) > a) {
        flag = 1;
        break;
      } else {
        cou++;
        sum += j;
        val.push_back(j);
      }
    }
    cur = arr[i];
    if (flag == 1) {
      break;
    }
  }
  if (sum < a) {
    for (int i = arr[n - 1] + 1; i <= 1000000; i++) {
      if ((sum + i) > a) {
        break;
      } else {
        sum += i;
        val.push_back(i);
        cou++;
      }
    }
  }
  printf("%d\n", cou);
  for (int i = 0; i < val.size(); i++) {
    printf("%d ", val[i]);
  }
}
