#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:50000000")
using namespace std;
void solve();
int main() {
  solve();
  return 0;
}
void solve() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<int> ans;
  int need = 1;
  for (int i = 0; i < n; i++)
    if (a[i] == need) {
      ans.push_back(2001 + i);
      need++;
    }
  cout << ((int)(ans).size()) << endl;
  for (int i = 0; i < ((int)(ans).size()); i++) cout << ans[i] << " ";
}
