A,B,C,X,Y = list(map(int,input().split()))
if A+B <= 2*C:
    print(A*X+B*Y)
    exit()
if X == Y:
    print(2*C*X)
elif X > Y:
    tmp = 2*C*Y
    m = min(2*C*(X-Y),A*(X-Y))
    print(tmp+m)
else:
    tmp = 2*C*X
    m = min(2*C*(Y-X),A*(Y-X))
    print(tmp+m)