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