#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, item, cursor = 1;
  cin >> n;
  vector<int> ans;
  for (int i = 1; i <= n; i++) {
    cin >> item;
    if (cursor == item) {
      ans.push_back(i + 2000);
      cursor++;
    }
  }
  cout << cursor - 1 << endl;
  for (int it : ans) cout << it << " ";
  return 0;
}
