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