#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, p = 1, t, flag = 1;
  cin >> n;
  int arr[n], mx = 0;
  for (i = 0; i < n; i++) {
    cin >> arr[i];
    if (i > 0)
      mx = max(mx, arr[i - 1]);
    else if (i == 0) {
      if (arr[i] != 0) {
        cout << 1;
        return 0;
      }
    }
    if (arr[i] <= mx + 1) {
      continue;
    } else {
      cout << i + 1;
      return 0;
    }
  }
  cout << -1;
  return 0;
}
