#include <bits/stdc++.h>
using namespace std;
int B[100005];
int main() {
  ios::sync_with_stdio(false);
  int n, e = 1;
  cin >> n;
  vector<int> R;
  for (int i = 1; i <= n; i++) {
    int x;
    cin >> x;
    if (x == e) {
      e++;
      R.push_back(2000 + i);
    }
  }
  cout << R.size() << endl;
  for (int i = 0, s = R.size(); i < s; i++) cout << R[i] << " ";
  return 0;
}
