#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int arr[n];
  for (int i = 0; i < n; i++) scanf("%d", arr + i);
  vector<int> v;
  int x = 1;
  int pos = 0;
  while (true) {
    int temp = find(arr + pos, arr + n, x++) - arr;
    if (temp == n) break;
    pos = temp;
    v.push_back(2001 + temp);
  }
  if (v.empty())
    printf("0");
  else {
    printf("%d\n", v.size());
    for (int a : v) printf("%d ", a);
  }
  return 0;
}
