N, A, B = map(int, input().split()) X = list(map(int, input().split())) X.append(10**19) d = [i for i in range(N)] C = [1]*N j=k=-1 cc = 1 for i in range(N): jj = j while X[j+1] < X[i]+A: j+=1 ks = [] while X[k+1] <= X[i]+B: k+=1 ks.append(k) if j < k and d[j+1] != j+1: d[i] = d[i-1] C[d[i]] += 1 for kk in ks: if j