#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, n, l = 0, r = 0, ans = -1, a;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (a > ans) {
      if (a - 1 != ans) {
        cout << i + 1;
        return 0;
      }
      ans = a;
    }
  }
  cout << -1;
  return 0;
}
