#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, i, n, cur = 0;
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> a;
    if (a > cur) {
      cout << i << "\n";
      return 0;
    }
    cur = max(cur, a + 1);
  }
  cout << "-1\n";
  return 0;
}
