#include <bits/stdc++.h>
using namespace std;
int n;
int a[100010];
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  if (a[1] != 0) {
    cout << 1;
    return 0;
  }
  int ma = 0;
  for (int i = 2; i <= n; ++i) {
    if (a[i] > ma + 1) {
      cout << i;
      return 0;
    } else if (a[i] == ma + 1)
      ma++;
  }
  cout << -1;
  return 0;
}
