#include using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); cin.tie(0); int n, k, x; cin >> n >> k >> x; array dp = { 0, 1LL << 60 }; for (int i = 0; i < n; i++) { int a; cin >> a; auto p = dp; dp[0] = min(p[0], p[1]) + a; dp[1] = min(p[0] + x, p[1]) + k; } cout << min(dp[0], dp[1]) << endl; return 0; }