#include <bits/stdc++.h>
using namespace std;
int arr[100005];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) cin >> arr[i];
  int mx = 0;
  for (int i = 1; i <= n; i++) {
    if (arr[i] > mx) {
      cout << i << endl;
      return 0;
    }
    mx = max(mx, arr[i] + 1);
  }
  cout << "-1" << endl;
}
