#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const int IINF = 1000000000;
const double PI = acos(-1.0);
const long long LINF = 6000000000000000000LL;
int main() {
  int n;
  while (scanf("%d", &n) == 1) {
    vector<int> v(n);
    for (int i = 0; i < n; ++i) {
      scanf("%d", &v[i]);
    }
    int found = 0;
    int pos = 0;
    vector<int> answer;
    while (pos < n) {
      if (v[pos] == found + 1) {
        answer.push_back(2000 + pos + 1);
        pos++;
        found++;
      } else {
        pos++;
      }
    }
    printf("%d\n", answer.size());
    for (int i = 0; i < answer.size(); ++i) {
      printf("%d ", answer[i]);
    }
    puts("");
  }
  return 0;
}
