#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> v;
int main() {
  scanf("%d", &n);
  int cc = 1, a;
  for (int i = 0; i < (int)(n); i++) {
    scanf("%d", &a);
    if (a == cc) v.push_back(i), cc++;
  }
  printf("%d\n", (int)(v).size());
  for (int i = 0; i < (int)((int)(v).size()); i++)
    printf("%d ", v[i] + 1 + 2000);
  return 0;
}
