#include <bits/stdc++.h>
using namespace std;
const int N = 105;
int n;
int a[N];
bool vis[N];
int mark = 1;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++)
    if (a[i] == mark) mark++, vis[i] = true;
  printf("%d\n", mark - 1);
  for (int i = 1; i <= n; i++)
    if (vis[i]) printf("%d ", i + 2000);
  return 0;
}
