from math import inf def main(): N, K, X = map(int, input().split()) A = list(map(int, input().split())) dp_table = [[inf, inf] for _ in range(N+1)] dp_table[0][0] = 0 for day, problem_num in enumerate(A, 1): dp_table[day][0] = min(dp_table[day-1]) + problem_num dp_table[day][1] = min(dp_table[day-1][0] + X, dp_table[day-1][1]) + K print(min(dp_table[N])) if __name__ == "__main__": main()