#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, a[N], k;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (a[0] != 0) {
    cout << 1 << endl;
    return 0;
  }
  for (int i = 1; i < n; i++) {
    if (a[i] > k) {
      if (a[i] - k == 1) {
        k++;
      } else {
        cout << i + 1 << endl;
        return 0;
      }
    }
  }
  cout << -1 << endl;
  return 0;
}
