#include <bits/stdc++.h>
using namespace std;
const long long INF = LLONG_MAX;
const long long base = 1e9;
const double PI = acos(-1);
const long long MOD = 1e9 + 7;
const long long N = 1e5 + 10;
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (a[0] != 0) {
    cout << "1" << endl;
    return 0;
  }
  long long mx = 0;
  for (int i = 1; i < n; i++) {
    mx = max(mx, a[i - 1]);
    if (a[i] - mx > 1) {
      cout << i + 1 << endl;
      return 0;
    }
  }
  cout << "-1" << endl;
  return 0;
}
