#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, n, g, a[105], b;
  cin >> n;
  g = 1;
  for (i = 1; i <= n; i++) {
    cin >> b;
    if (b == g) a[g++] = 2000 + i;
  }
  g--;
  cout << g << endl;
  for (i = 1; i <= g; i++) cout << " " << a[i];
  cout << endl;
  return 0;
}
