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