#include <bits/stdc++.h>
using namespace std;
double const pi = 3.1415926535897932384626433832795;
int const inf = (int)1e9;
long long const inf64 = (int)2e18;
const string task = "";
int n, now;
vector<int> ans;
int main() {
  cin >> n;
  now = 0;
  for (int i = 0; i < (int)n; i++) {
    int x;
    cin >> x;
    if (x == now + 1) {
      now++;
      ans.push_back(i + 2001);
    }
  }
  cout << ans.size() << endl;
  for (int i = 0; i < (int)ans.size(); i++) cout << ans[i] << " ";
  return 0;
}
