#include <bits/stdc++.h>
using namespace std;
long long spf[100001];
long long gcd(long long a, long long b);
long long palindrome(string s);
long long modexp(long long a, long long b, long long m);
void sieve();
long long ceil(long long a, long long b);
vector<long long> getFactorization(long long x);
void getZarr(string str, long long Z[]);
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long mx = -1;
  long long ans = -1;
  for (long long i = 0; i < n; i++) {
    if (a[i] > mx + 1) {
      ans = i + 1;
      break;
    } else if (a[i] > mx) {
      mx = a[i];
    }
  }
  cout << ans << endl;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (a == b) return a;
  if (a > b) return gcd(a % b, b);
  return gcd(a, b % a);
}
long long palindrome(string s) {
  long long l = 0;
  long long h = s.length() - 1;
  while (h > l) {
    if (s[l++] != s[h--]) {
      return 0;
    }
  }
  return 1;
}
long long modexp(long long a, long long b, long long m) {
  if (b == 0) return 1;
  long long temp = modexp(a, b / 2, m);
  temp = (temp * temp) % m;
  if (b & 1) return (temp * (a % m)) % m;
  return temp;
}
void sieve() {
  spf[1] = 1;
  for (long long i = 2; i < 100001; i++) spf[i] = i;
  for (long long i = 4; i < 100001; i += 2) spf[i] = 2;
  for (long long i = 3; i * i < 100001; i++) {
    if (spf[i] == i) {
      for (long long j = i * i; j < 100001; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
vector<long long> getFactorization(long long x) {
  vector<long long> ret;
  while (x != 1) {
    ret.push_back(spf[x]);
    x = x / spf[x];
  }
  return ret;
}
long long ceil(long long a, long long b) { return a / b + (a % b != 0); }
void getZarr(string str, long long Z[]) {
  long long n = str.length();
  long long L, R, k;
  L = R = 0;
  for (long long i = 1; i < n; ++i) {
    if (i > R) {
      L = R = i;
      while (R < n && str[R - L] == str[R]) R++;
      Z[i] = R - L;
      R--;
    } else {
      k = i - L;
      if (Z[k] < R - i + 1)
        Z[i] = Z[k];
      else {
        L = i;
        while (R < n && str[R - L] == str[R]) R++;
        Z[i] = R - L;
        R--;
      }
    }
  }
}
