import sys input = sys.stdin.readline N, K, X = map(int, input().split()) A = list(map(int, input().split())) dp = [[10**18]*2 for _ in range(N+1)] dp[0][0] = 0 for i in range(N): dp[i+1][0] = min(dp[i][0]+A[i], dp[i][1]+A[i]) dp[i+1][1] = min(dp[i][0]+X+K, dp[i][1]+K) print(min(dp[N]))