#include <bits/stdc++.h>
using namespace std;
const long INF = 100000;
int grid[50][50];
long long int conv(long long int a, long long int k) {
  long long int ans = 0, len = 0;
  while (a != 0) {
    len++;
    long long int r = a % k;
    ans = ans * 10;
    ans += r;
    a /= k;
  }
  long long int finale = 0;
  while (ans != 0 && len) {
    long long int r = ans % 10;
    finale += r * pow(10, len - 1);
    len--;
    ans /= 10;
  }
  return finale;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int l = 0;
  vector<int> v;
  for (int i = 1; i <= n; i++) {
    bool found = false;
    for (int j = l; j < n; j++) {
      if (a[j] == i) {
        found = true;
        v.push_back(j);
        l = j;
        break;
      }
    }
    if (!found) break;
  }
  cout << v.size() << '\n';
  if (v.size() != 0)
    for (vector<int>::iterator it = v.begin(); it != v.end(); it++)
      cout << *it + 2001 << " ";
  return 0;
}
