#include <bits/stdc++.h>
using namespace std;
int main() {
  long int n;
  cin >> n;
  std::vector<long int> v;
  for (int i = 0; i < n; i++) {
    int index;
    cin >> index;
    v.push_back(index);
  }
  long int maxx = -1;
  long int i;
  for (i = 0; i < n; i++) {
    if (v[i] > maxx + 1) {
      cout << i + 1;
      break;
    }
    maxx = max(maxx, v[i]);
  }
  if (i == n) cout << -1;
  return 0;
}
