#include <bits/stdc++.h>
using namespace std;
using LL = int64_t;
const int maxn = 1e5 + 5;
const LL mod = 1e9 + 7;
const int INF = 1e9;
const LL LLINF = 1e14;
const double pi = acos(-1.0);
LL a[maxn];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  LL n, maxs = -1;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) {
    if (a[i] > maxs && a[i] - 1 > maxs) {
      cout << i;
      return 0;
    }
    maxs = max(maxs, a[i]);
  }
  cout << -1;
  return 0;
}
