n, k, x = map(int, input().split()) INF = 10 ** 18 dp = [0, INF] for a in map(int, input().split()): dp = [min(dp) + a, min(dp[0] + x, dp[1]) + k] print(min(dp))