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

ab = c * 2

if ab < a and ab < b:
    print(max(x, y) * ab)
else:
    answer = min(a+b, ab) * min(x, y)
    rest = max(x, y) - min(x, y)
    rest = rest * a if x > y else rest * b
    print(answer + rest)