#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> graph, ans;
  int dif = 1;
  int rel = 0;
  int n, input;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> input;
    graph.push_back(input);
  }
  for (int i = 0; i < n; i++) {
    if (graph[i] == dif) {
      ans.push_back(2000 + 1 + i);
      dif++;
    }
  }
  if (dif == 1) {
    cout << 0;
  } else {
    cout << ans.size() << endl;
    for (int i = 0; i < ans.size(); i++) {
      cout << ans[i] << " ";
    }
  }
  return 0;
}
