#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> v;
  int a;
  for (int i = 0; i < n; i++) {
    cin >> a;
    v.push_back(a);
  }
  int mn = 0;
  for (int i = 0; i < n; i++) {
    a = v[i];
    if (a > mn) {
      cout << i + 1;
      return 0;
    }
    if (a == mn) {
      mn = a + 1;
    }
  }
  cout << -1;
  return 0;
}
