#include <bits/stdc++.h>   using namespace std;   const int inf = (int)1.01e9;   const double eps = 1e-9;   const int maxn = (int)2e5 + 10;   set<int> S;   int main() {     int n, k, a;     scanf( %d%d%d , &n, &k, &a);     int cur = (n + 1) / (a + 1);     assert(cur >= k);     int m;     scanf( %d , &m);     for (int i = 0; (i) < (m); ++i) {       int x;       scanf( %d , &x);       set<int>::iterator it = S.lower_bound(x);       int left = 0;       int right = n + 1;       if (it != S.end()) {         right = *it;       }       if (it != S.begin()) {         --it;         left = *it;       }       cur -= (right - left) / (a + 1);       cur += (x - left) / (a + 1);       cur += (right - x) / (a + 1);       if (cur < k) {         printf( %d n , i + 1);         return 0;       }       S.insert(x);     }     printf( -1 n );     return 0;   }   