import numpy as np
A, B, C, X, Y = list(map(int,input().strip().split(' ')))

tmp = np.array([A,B])-np.array([C, C])
if abs(tmp[0]) >= abs(tmp[1]):
        if tmp[0] >= 0 and tmp[0] >= 0:
                print(2*C*X + C*(max(Y-X,0)))
        if tmp[0] >= 0 and tmp[0] < 0:
                print(2*C*X + A*(max(Y-X,0)))
        if tmp[0] < 0 and tmp[0] >= 0:
                print(A*X + C*2*Y)
        if tmp[0] < 0 and tmp[0] < 0:
                print(A*X + B*Y)
if abs(tmp[0]) < abs(tmp[1]):
        if tmp[0] >= 0 and tmp[0] >= 0:
                print(B*Y + C*2*X)
        if tmp[0] >= 0 and tmp[0] < 0:
                print(B*Y + A*X)
        if tmp[0] < 0 and tmp[0] >= 0:
                print(2*C*Y + C*(max(X-Y,0)))
        if tmp[0] < 0 and tmp[0] < 0:
                print(2*C*Y + A*(max(X-Y,0)))
