#include <bits/stdc++.h>
using namespace std;
struct income_amounted {
  int income;
  int year;
} company[110];
int main() {
  int n, k, t, flag, num[110];
  while (cin >> n) {
    k = t = flag = 0;
    for (int i = 1; i <= n; i++) {
      cin >> company[i].income;
      company[i].year = i;
    }
    for (int i = 1;; i++) {
      flag = 0;
      for (int j = t + 1; j <= n; j++) {
        if (company[j].income == i) {
          flag = 1;
          num[k] = company[j].year;
          k++;
          t = j;
          break;
        }
      }
      if (flag == 0) {
        break;
      }
    }
    cout << k << endl;
    for (int i = 0; i < k; i++) {
      if (i != (k - 1)) {
        cout << num[i] + 2000 << " ";
      } else {
        cout << num[i] + 2000 << endl;
      }
    }
  }
  return 0;
}
