T = int(input()) L,R,A,B = map(float,input().split()) ans = 0 if A < 0: ans = (A * L) + B else: ans = (A * R) + B print(ans)