#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  std::cout.precision(12);
  int n;
  cin >> n;
  int a[n];
  for (long long int i = 0; i < n; i++) cin >> a[i];
  int c = 1;
  vector<int> y;
  for (long long int i = 0; i < n; i++) {
    if (a[i] == c) {
      y.push_back(2001 + i);
      c++;
    }
  }
  cout << y.size() << endl;
  for (long long int i = 0; i < y.size(); i++) cout << y[i] << " ";
}
