#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 100002;
long long n, limit;
long long arr[MAXN];
inline long long rangeSum(long long l, long long r) {
  return (l + r) * (r - l + 1) / 2;
}
signed main() {
  ios::sync_with_stdio(false);
  cin >> n >> limit;
  for (long long i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  sort(arr + 1, arr + 1 + n);
  n++;
  arr[0] = 0;
  arr[n] = 1000000001;
  long long S = 0;
  long long cnt = 0;
  for (long long i = 1; i <= n; i++) {
    long long s = rangeSum(arr[i - 1] + 1, arr[i] - 1);
    S += s;
    cnt += arr[i] - arr[i - 1] - 1;
    if (false || (S <= limit && S + arr[i] + 1 > limit)) {
      cout << cnt << endl;
      bool f = 1;
      for (long long j = 1; j <= i; j++) {
        for (long long k = arr[j - 1] + 1; k < arr[j]; k++) {
          if (f)
            f = 0;
          else
            cout << ' ';
          cout << k;
        }
      }
      cout << endl;
      return 0;
    } else if (S > limit) {
      S -= s;
      cnt -= arr[i] - arr[i - 1] - 1;
      long long l = 1, r = arr[i] - arr[i - 1] - 1;
      while (l < r) {
        long long mid = l + r - (l + r) / 2;
        if (S + rangeSum(arr[i - 1] + 1, arr[i - 1] + mid) <= limit)
          l = mid;
        else
          r = mid - 1;
      }
      cnt += l;
      cout << cnt << endl;
      bool f = 1;
      for (long long j = 1; j <= i; j++) {
        for (long long k = arr[j - 1] + 1; k < arr[j]; k++) {
          if (k > arr[i - 1] + l) break;
          if (f)
            f = 0;
          else
            cout << ' ';
          cout << k;
        }
      }
      cout << endl;
      return 0;
    }
  }
}
