inf=10**18 s=0 N,K,X=map(int,input().split()) A=list(map(int,input().split())) dp=[[inf,inf]for i in range(N+1)] dp[0][0]=0 for i in range(N): dp[i+1][0]=min(dp[i+1][0],dp[i][0]+A[i]) dp[i+1][1]=min(dp[i+1][1],dp[i][0]+A[i]+X) dp[i+1][0]=min(dp[i+1][0],dp[i][1]+A[i]) dp[i+1][1]=min(dp[i+1][1],dp[i][1]+K) print(min(dp[N]))