#include <bits/stdc++.h>
using namespace std;
int x4[] = {1, 0, -1, 0};
int y4[] = {0, 1, 0, -1};
int x8[] = {1, 0, -1, 0, 1, -1, 1, -1};
int y8[] = {0, 1, 0, -1, 1, -1, -1, 1};
void sciar(int a[], int n) {
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
}
int main() {
  int n;
  scanf("%d", &n);
  int yr = 2001, inc = 1;
  vector<int> res;
  for (int i = 0; i < n; i++) {
    int a;
    scanf("%d", &a);
    if (a == inc) {
      res.push_back(yr);
      inc++;
    }
    yr++;
  }
  printf("%d\n", (int)res.size());
  for (int it : res) printf("%d ", it);
  return 0;
}
