#include <bits/stdc++.h>
int a[101];
bool b[101];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  int res = 1;
  for (int i = 1; i <= n; i++)
    if (a[i] == res) {
      res++;
      b[i] = 1;
    }
  res--;
  printf("%d\n", res);
  if (res) {
    for (int i = 1; i <= n; i++) {
      if (b[i]) {
        printf("%d ", 2000 + i);
      }
    }
  }
  return 0;
}
