#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> years;
  int curr = 1;
  for (int i = 1; i <= n; ++i) {
    int x;
    cin >> x;
    if (x == curr) {
      ++curr;
      years.push_back(2000 + i);
    }
  }
  cout << years.size() << endl;
  for (int year : years) {
    cout << year << " ";
  }
}
