a,b,c,x,y = map(int,input().split())
dic = {x:a,y:b}
if a + b < c * 2:
    print(x * a + y * b)
elif a > c * 2 and b > c * 2:
    print(max(x,y) * 2 * c)
elif a > c * 2:
    if x > y:
        print(x * 2 * c)
    else:
        print(x * 2 * c + (y - x) * b)
elif b > c * 2:
    if y > x:
        print(y * 2 * c)
    else:
        print(y * 2 * c + (x - y) * a)
elif a + b > c * 2:
    print(min(x,y) * 2 * c + (max(x,y) - min(x,y)) * dic[max(x,y)])