#include <bits/stdc++.h>
struct _Data {
  int v;
  int y;
};
int main() {
  int i, t, k, s, c, j;
  struct _Data ar[200];
  scanf("%d", &t);
  i = 0;
  c = 1;
  j = 2001;
  while (t--) {
    scanf("%d", &k);
    if (k == c) {
      ar[i].v = k;
      ar[i].y = j;
      ++c;
      ++i;
    }
    ++j;
  }
  s = i;
  printf("%d\n", s);
  for (i = 0; i < s; ++i) printf("%d ", ar[i].y);
  printf("\n");
  return 0;
}
