#include <bits/stdc++.h>
using namespace std;
int n, mx = -1, a;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a);
    if (a > mx + 1) {
      cout << i << endl;
      return 0;
    }
    mx = max(mx, a);
  }
  puts("-1");
  return 0;
}
