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