#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, ans = -1;
  cin >> n;
  vector<int> arr(n);
  int val = -1;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  if (arr[0] != 0) {
    cout << 1 << endl;
    return;
  }
  for (int i = 1; i < n; i++) {
    val = max(val, arr[i - 1]);
    if (arr[i] > val + 1) {
      ans = i + 1;
      break;
    }
  }
  cout << ans << endl;
}
int main() {
  solve();
  return 0;
}
