#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, j, k, dp[3001], a[3001];
  while (cin >> n) {
    int i;
    for (i = 0; i < n; i++) cin >> a[i];
    memset(dp, 0, sizeof(dp));
    bool f = 0;
    int pos = 0;
    for (i = 0; i < n; i++) {
      if (a[i] == 1) {
        f = 1;
        dp[pos++] = 2000 + i + 1;
        break;
      }
    }
    int pre = a[i];
    if (f) {
      for (j = i + 1; j < n; j++) {
        if (pre + 1 == a[j]) {
          dp[pos++] = 2000 + j + 1;
          pre = a[j];
        }
      }
    }
    if (!f)
      cout << "0" << endl;
    else {
      cout << pos << endl;
      for (i = 0; i < pos; i++)
        if (i != pos - 1)
          cout << dp[i] << " ";
        else
          cout << dp[i] << endl;
    }
  }
  return 0;
}
