a, b, c, x, y = map(int, input().split())

tmp1 = c * min(x, y) * 2
tmp2 = min(a, b) * abs(x - y)

pattern1 = (a * x + b * y)
pattern2 = tmp1 + tmp2
pattern3 = c * max(x, y) * 2

print(min(pattern1, pattern2, pattern3))

