def solve(): N,K,X=map(int,input().split()) A=["*"]+list(map(int,input().split())) inf=float("inf") DPt=[inf]*(N+1); DPf=[inf]*(N+1) DPf[0]=0 for day in range(1,N+1): DPt[day]=min(DPt[day-1]+K, DPf[day-1]+X+K) DPf[day]=min(DPt[day-1]+A[day], DPf[day-1]+A[day]) return min(DPt[N], DPf[N]) #================================================== print(solve())