#include <bits/stdc++.h>
using namespace std;
int n, ai[100001], mx;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i += 1) cin >> ai[i];
  if (ai[1] != 0) {
    cout << 1;
    return 0;
  }
  for (int i = 2; i <= n; i += 1) {
    if (ai[i] > mx + 1) {
      cout << i;
      return 0;
    }
    mx = max(mx, ai[i]);
  }
  cout << -1;
  return 0;
}
