#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long *a = new long long[n];
  for (long long i = 0; i < n; ++i) cin >> a[i];
  if (a[0] != 0) {
    cout << 1;
    return 0;
  }
  long long mx = 0;
  for (long long i = 1; i < n; ++i)
    if (a[i] > mx + 1) {
      cout << i + 1;
      return 0;
    } else
      mx = max(mx, a[i]);
  cout << -1;
  return 0;
}
