#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  std::ios::sync_with_stdio(false);
  int n;
  cin >> n;
  pair<int, int> A[n];
  for (int i = 0; i < n; i++) {
    cin >> A[i].first;
    A[i].second = 2001 + i;
  }
  vector<pair<int, int> > v;
  int ind = -1;
  for (int i = 1; i <= 100; i++) {
    for (int j = 0; j < n; j++) {
      if (A[j].first == i && j > ind) {
        ind = j;
        v.push_back({A[j].first, A[j].second});
        break;
      }
    }
    if (v.size() < i) {
      break;
    }
  }
  cout << v.size();
  if (v.size() != 0) {
    cout << "\n";
  }
  for (int i = 0; i < v.size(); i++) {
    cout << v[i].second << " ";
  }
  return 0;
}
