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