#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int cur = 1;
  vector<int> ans;
  for (int i = 0; i < n; i++) {
    int v;
    cin >> v;
    if (v == cur) {
      ans.push_back(2001 + i);
      cur++;
    }
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  return 0;
}
