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