#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return (b == 0 ? a : gcd(b, a % b)); }
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
int ncr(int n, int k) { return (k == 0 ? 1 : (n * ncr(n - 1, k - 1)) / k); }
long long modularexpo(long long b, long long e, long long m) {
  if (m == 1) {
    return 0;
  }
  long long res = 1;
  b %= m;
  while (e > 0) {
    if (e % 2 == 1) {
      res = (res * b) % m;
    }
    e = e >> 1;
    b = (b * b) % m;
  }
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, cnt = 0;
  cin >> n;
  int a[n], freq[2001] = {0};
  vector<int> b;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > 0) {
      b.push_back(a[i]);
      if (a[i] == 1) {
        cnt = 1;
      }
    }
  }
  if (cnt == 0 || b.size() == 0) {
    cout << "0";
  } else {
    int x = 1;
    b.clear();
    for (int i = 0; i < n; i++) {
      if ((a[i] > 0 && freq[a[i]] == 0) && (a[i] == x)) {
        b.push_back(2000 + i + 1);
        x++;
      }
    }
    cout << x - 1 << "\n";
    for (int c : b) {
      cout << c << " ";
    }
  }
  return 0;
}
