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