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

a_total = A * X
b_total = B * Y

total = a_total + b_total

c_mul = (X + Y) // 2

c_total = C * (2 * c_mul)

if X > Y:
    c_total += A * (X - c_mul)
if Y > X:
    c_total += B * (Y - c_mul)

if total > c_total:
    print(c_total)
else:
    print(total)