#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
using namespace std;
int n;
int a[100001];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int maxx = -1;
  for (int i = 1; i <= n; i++) {
    if (a[i] > maxx + 1) {
      cout << i;
      return 0;
    }
    maxx = max(maxx, a[i]);
  }
  cout << "-1";
  return 0;
}
