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