#include <bits/stdc++.h>
using namespace std;
int N, arr[100001];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int mx = -1;
  cin >> N;
  for (int i = 1; i <= N; i++) {
    cin >> arr[i];
    if (arr[i] > mx + 1) {
      cout << i << endl;
      return 0;
    }
    mx = max(mx, arr[i]);
  }
  cout << -1 << endl;
  return 0;
}
