import sys from collections import deque, Counter sys.setrecursionlimit(5 * 10 ** 5) from pypyjit import set_param set_param('max_unroll_recursion=-1') input = lambda: sys.stdin.readline().rstrip() ii = lambda: int(input()) mi = lambda: map(int, input().split()) li = lambda: list(mi()) inf = 2 ** 63 - 1 mod = 998244353 n, k, x = mi() a = li() dp = [0, inf] 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))