#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL);
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<int> v;
  for (int i = 0, j = 1; i < n; i++) {
    if (a[i] == j) {
      v.push_back(i + 2001);
      j++;
    }
  }
  cout << v.size() << "\n";
  for (auto x : v) {
    cout << x << " ";
  }
  return 0;
}
