#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i <= n - 1; i++) {
    cin >> a[i];
  }
  int i = 0, chk = 1;
  vector<int> ans;
  while (i < n) {
    int j = i;
    while (j < n) {
      if (a[j] == (chk)) {
        ans.push_back(j + 1);
        chk++;
        break;
      }
      j++;
    }
    j++;
    i = j;
  }
  cout << ans.size() << '\n';
  for (auto x : ans) {
    cout << (2000) + x << " ";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  ;
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
