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