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