#include <bits/stdc++.h>
using namespace std;
int a[1234567];
int w[1234567];
int main() {
  int n, m, q, i;
  while (scanf("%d%d", &n, &m) != EOF) {
    int k = 0;
    memset(a, 0, sizeof(a));
    for (i = 0; i < n; i++) {
      scanf("%d", &q);
      if (q < 1234560) a[q] = 1;
    }
    i = 1;
    while (1) {
      if (m < i) break;
      if (a[i] == 0 && m >= i) {
        m -= i;
        w[k++] = i;
      }
      i++;
    }
    if (m != 0) {
      for (i = m + w[k - 1]; i >= w[k - 1]; i--) {
        if (a[i] == 0) {
          w[k - 1] = i;
          break;
        }
      }
    }
    printf("%d\n", k);
    for (i = 0; i < k; i++) printf("%d%c", w[i], i == k - 1 ? '\n' : ' ');
  }
  return 0;
}
