n, k, x = map(int,input().split()) a = list(map(int,input().split())) dp = [0, x] for v in a: e = [0,0] e[0] = min(dp[0] + v, dp[1] + v) e[1] = min(dp[0] + k + x, dp[1] + k) dp = e print(min(dp))