#include <bits/stdc++.h>
int main() {
  int n;
  while (scanf("%d", &n) != EOF) {
    int a[n], b[n], k = 0;
    for (int i = 0; i < n; i++) {
      scanf("%d", &a[i]);
    }
    for (int i = 0; i < n; i++) {
      if (a[i] == (1 + k)) {
        b[k] = i + 2001;
        k++;
      }
    }
    printf("%d\n", k);
    for (int i = 0; i < k; i++) {
      if (i == 0)
        printf("%d", b[i]);
      else {
        printf(" ");
        printf("%d", b[i]);
      }
    }
    printf("\n");
  }
  return 0;
}
