#関数リスト
import sys
input = sys.stdin.readline


def RD(): return input().rstrip()
def I(): return int(input().rstrip())
def MI(): return map(int, input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float,input().split()))

def main():
    A, B, C, X, Y = MI()
    if C >= (A+B) / 2:
        print(A*X+B*Y)
    else:
        temp = min(X,Y)
        print(C*temp*2+(X-temp)*A+(Y-temp)*B)
    
    
if __name__ == "__main__":
    main()