#include <bits/stdc++.h>
using namespace std;
long long MOD = 1e9 + 7;
int main() {
  int n;
  cin >> n;
  long long a[n];
  set<long long> s;
  s.insert(0);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    if (s.find(a[i]) == s.end()) {
      cout << i + 1;
      return 0;
    }
    s.insert(a[i] + 1);
  }
  cout << -1;
  return 0;
}
