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