#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int n, i, maximum = -1;
  cin >> n;
  long long int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > maximum + 1) {
      cout << i + 1;
      return 0;
    } else
      maximum = max(maximum, a[i]);
  }
  cout << "-1";
  return 0;
}
