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