#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  long long arr[n];
  set<long long> s;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  if (arr[0] != 0) {
    cout << 1 << endl;
    return 0;
  }
  s.insert(0);
  int f = 0;
  for (int i = 1; i < n; i++) {
    long long last = *(s.rbegin());
    if (arr[i] > last + 1) {
      f = 1;
      cout << (i + 1) << endl;
      break;
    }
    s.insert(arr[i]);
  }
  if (f == 0) cout << "-1" << endl;
  return 0;
}
