#include <bits/stdc++.h>
using namespace std;
bool Is_Palindrome(string s) {
  if (equal(s.begin(), s.begin() + s.size() / 2, s.rbegin()))
    return true;
  else
    return false;
}
bool isPrime(long long int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (int i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
long long int fact(long long int n);
long long int nCr(long long int n, long long int r) {
  return fact(n) / (fact(r) * fact(n - r));
}
long long int fact(long long int n) {
  long long int res = 1;
  for (int i = 2; i <= n; i++) res = res * i;
  return res;
}
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  if (a[0] != 0) {
    cout << 1;
    exit(0);
  }
  int M = 0;
  for (int i = 1; i < n; i++) {
    M = max(M, a[i - 1]);
    if (a[i] > M + 1) {
      cout << i + 1;
      exit(0);
    }
  }
  cout << -1;
}
