#include int main () { int n = 0; long long k = 0LL; long long x = 0LL; long long a = 0LL; int res = 0; long long dp[2] = {}; res = scanf("%d", &n); res = scanf("%lld", &k); res = scanf("%lld", &x); res = scanf("%lld", &a); dp[0] = a; dp[1] = k+x; for (int i = 1; i < n; i++) { long long nxt[2] = {}; res = scanf("%lld", &a); nxt[0] = dp[0]+a; nxt[1] = dp[1]+k; if (dp[1]+a < nxt[0]) { nxt[0] = dp[1]+a; } if (dp[0]+k+x < nxt[1]) { nxt[1] = dp[0]+k+x; } dp[0] = nxt[0]; dp[1] = nxt[1]; } if (dp[0] < dp[1]) { printf("%lld\n", dp[0]); } else { printf("%lld\n", dp[1]); } return 0; }