N,S,B = map(int, input().split()) H = list(map(int,input().split())) for i in range(N-1): s = S while H[i]0: s -= 1 H[i] += B if H[i]