T = int(input()) L = int(input()) R = int(input()) A = int(input()) B = int(input()) ans = 0 if A > 0: ans = A * R + B elif A < 0: ans = A * L + B else: ans = B print(ans)