#include <bits/stdc++.h>
using namespace std;
int a[100500];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int l = -1;
  vector<int> ans;
  for (int i = 1; i <= n; ++i) {
    bool f = 0;
    for (int j = l + 1; j < n; ++j) {
      if (a[j] == i) {
        f = 1;
        l = j;
        ans.push_back(j);
        break;
      }
    }
    if (!f) break;
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); ++i) {
    cout << 2001 + ans[i] << " ";
  }
  cout << endl;
  return 0;
}
