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