n, a, b, w = map(int, input().split()) D = list(map(int, input().split())) from collections import deque stack = deque([1<<60]) ans = 0 num = 0 for d in D: while stack and stack[-1]>d: stack.pop() stack.append(d) if stack and b*(num+1)-a>stack[-1]: ans += stack.popleft() num = 0 else: num += 1 ans += b*num-a print(ans+w)