A,B,C,X,Y = map(int,input().split())

minValue = float('inf')

for i in range(0,100001,2):
    total = 2 * i * C
    if i < X:
        total += A * (X - i)
    if i < Y:
        total += B * (Y - i)
    if minValue > total:
        minValue = total

print(minValue)
