#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  long long int arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  long long int ans = -1;
  int max = -1;
  for (int i = 0; i < n; i++) {
    if (max < arr[i]) {
      if (arr[i] - max > 1) {
        ans = i + 1;
        break;
      } else
        max = arr[i];
    }
  }
  cout << ans << "\n";
  return 0;
}
