import sys #input = sys.stdin.readline #input = sys.stdin.buffer.readline #文字列はダメ sys.setrecursionlimit(1000000) import math import bisect #import itertools #import random #from heapq import heapify, heappop, heappush from collections import defaultdict from collections import deque #import copy #DeepCopy: hoge = [_[:] for _ in hogehoge] #from functools import lru_cache #@lru_cache(maxsize=None) #MOD = pow(10,9) + 7 MOD = 998244353 #dx = [1,0,-1,0] #dy = [0,1,0,-1] #dx8 = [1,1,0,-1,-1,-1,0,1] #dy8 = [0,1,1,1,0,-1,-1,-1] def main(): N,K,X = map(int,input().split()); INF = 1<<60 A = list(map(int,input().split())) # dp[i][j]; i番目まで見てj=0前日会員ではない、1前日会員の時の最小値 dp = [0,INF] for a in A: p = [INF,INF] p,dp = dp,p dp[0] = min(p[0] + a, p[1] + a) dp[1] = min(p[0] + K+X, p[1] + K) ans = min(dp) print(ans) if __name__ == '__main__': main()