#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const long long inf = 1e18;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, k = 1;
  cin >> n;
  vector<int> ans;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (x == k) {
      ans.push_back(2000 + i + 1);
      k++;
    }
  }
  cout << k - 1 << endl;
  for (auto x : ans) {
    cout << x << " ";
  }
}
