#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, n, idx = 0, num, x, data = 1;
  cin >> n;
  vector<int> vec;
  for (i = 1; i <= n; i++) {
    cin >> x;
    if (x == data) {
      vec.push_back(2000 + i);
      idx++;
      data++;
    }
  }
  cout << idx << endl;
  for (i = 0; i < idx; i++) cout << vec[i] << " ";
  return 0;
}
