A,B,C,X,Y = map(int,input().split())
if X >= Y:
    a = A*X+B*Y
    b = A*(X-Y)+2*C*Y
    c = 2*C*X
    print(min(a,b,c))
else:
    a = A*X+B*Y
    b = 2*C*X+A*(Y-X)
    c = 2*C*Y
    print(min(a,b,c))