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