#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, req = 1;
  scanf("%d", &n);
  map<int, int> index;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    if (x == req) {
      index[x] = i + 1 + 2000;
      req++;
    }
  }
  int cnt = 0;
  for (int i = 1; index[i] != 0; i++) {
    cnt++;
  }
  printf("%d\n", cnt);
  if (cnt) printf("%d", index[1]);
  for (int i = 2; index[i] != 0; i++) {
    printf(" %d", index[i]);
  }
  if (cnt) printf("\n");
  return 0;
}
