
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
##############################

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

if a+b < ab*2:
    print(a*x + b*y)
else:
    price = 0
    if x > y:
        price += ab*2 * y
        x -= y
        if a*x > ab*2*x:
            price += ab*2*x
        else:
            price += a * x
    else:
        price += ab*2 * x
        y -= x
        if b*y > ab*2*y:
            price += ab*2*y
        else:
            price += b * x

    print(price)