#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n, x;
  cin >> n;
  int cur = 2001, cr = 1;
  vector<int> ret;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    if (x == cr) {
      ret.push_back(2000 + i);
      cr++;
    }
  }
  cout << ret.size() << endl;
  for (auto f : ret) cout << f << " ";
  return 0;
}
