a, b, c, x, y = [int(i) for i in input().split()]
min_a = a * x
min_b = b * y
min_c = max(x, y) * 2 * c
min_d = min(x, y) * 2 * c
min_a_b = min_a + min_b
if x > y:
    min_d = min_d + a * (x-y)
if x < y:
    min_d = min_d + a * (y-x)
if x != y:
    ans = min(min(min_a_b, min_c), min_d)
if x == y:
    ans = min(min_a_b, min_c)
print(ans)