#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int a[110];
  scanf("%d", &n);
  int temp = -1;
  bool flag = false;
  ;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] == 1 && !flag) {
      temp = i;
      flag = true;
    }
  }
  if (temp == -1) {
    printf("0\n");
    return 0;
  }
  int arr[110];
  int len = 0;
  while (temp <= n) {
    if (a[temp] == len + 1) {
      len++;
      arr[len] = temp;
    }
    temp++;
  }
  printf("%d\n", len);
  if (len == 0) return 0;
  printf("%d", arr[1] + 2000);
  for (int i = 2; i <= len; i++) {
    printf(" %d", arr[i] + 2000);
  }
  printf("\n");
  return 0;
}
