#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
int n, a[100005];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  if (a[1] != 0) {
    cout << 1;
    return 0;
  }
  int mx = 0;
  for (int i = 2; i <= n; i++) {
    if (a[i] > mx + 1) {
      cout << i;
      return 0;
    } else {
      mx = max(a[i], mx);
    }
  }
  cout << -1;
  return 0;
}
