#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[1000];
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<int> res;
  int p;
  int pp = 0;
  for (int i = 1; i <= n; i++) {
    p = res.size();
    for (int j = pp; j < n; j++) {
      if (a[j] == i) {
        pp = j + 1;
        res.push_back(j + 2001);
        break;
      }
    }
    if (res.size() == p) break;
  }
  if (res.size() == 0) {
    cout << '0' << endl;
  } else {
    cout << res.size() << endl;
    cout << res[0];
    for (int i = 1; i < res.size(); i++) {
      cout << ' ' << res[i];
    }
    cout << endl;
  }
}
