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