#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
int32_t main() {
  int n, a[100000], m = -1, ans = 0, s1 = 1;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++)
    if (a[i] == s1 && i > m) {
      ans++;
      s1++;
      m = i;
    }
  cout << ans << '\n';
  m = -1;
  s1 = 1;
  for (int i = 0; i < n; i++)
    if (a[i] == s1 && i > m) {
      cout << 2000 + i + 1 << ' ';
      s1++;
      m = i;
    }
  return 0;
}
