#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int m = 1000000007;
  long int n;
  cin >> n;
  long long int ar[n];
  for (int i = 0; i < n; i++) cin >> ar[i];
  int is = 1;
  if (ar[0] != 0) {
    cout << "1\n";
    return 0;
  }
  long long int max = 0;
  for (int i = 1; i < n; i++) {
    if (ar[i] > max) {
      if (ar[i] - max > 1) {
        cout << (i + 1) << "\n";
        return 0;
      }
      max = ar[i];
    }
  }
  if (is == 1) cout << "-1\n";
}
