#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[101], i, j, k, b[101], n, m;
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i];
  k = 0;
  m = 1;
  for (i = 1; i <= n; i++) {
    for (j = m; j <= n; j++)
      if (a[j] == i) {
        b[k] = 2000 + j;
        k++;
        m = j + 1;
        a[j] = 0;
        break;
      }
    if (k != i) break;
    if (k == 0) {
      cout << 0;
      return 0;
    }
  }
  cout << k << endl;
  for (i = 0; i < k; i++) cout << b[i] << " ";
  return 0;
}
