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