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