n, k, x = map(int, input().split()) A = list(map(int, input().split())) INF = 10**18 DP = [[INF for _ in range(3)] for _ in range(n + 1)] DP[0][0] = 0 for i in range(n): a = A[i] for j in range(3): if DP[i][j] != INF: for l in range(3): if l == 0: DP[i + 1][l] = min(DP[i + 1][l], DP[i][j] + a) elif l == 1: if j == 0: DP[i + 1][l] = min(DP[i + 1][l], DP[i][j] + k + x) else: if j != 0: DP[i + 1][l] = min(DP[i + 1][l], DP[i][j] + k) print(min(DP[n]))