#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  int a[n];
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  int sum = 0;
  int temp = 0;
  for (int i = 0; i < n; i++) {
    for (int j = temp; j < n; j++) {
      if (a[j] == sum + 1) {
        sum++;
        temp = j;
      }
    }
  }
  printf("%d\n", sum);
  int year[sum];
  for (int i = 0; i < sum; i++) year[i] = 0;
  temp = 0;
  for (int i = 0; i < sum; i++) {
    for (int j = temp; j < n; j++) {
      if (a[j] == i + 1) {
        printf("%d ", j + 2001);
        temp = j;
        break;
      }
    }
  }
  return 0;
}
