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