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

if x > y:
    p += (x - y) * a
    x = y
if x < y:
    p += (y - x) * b
    y = x
if x > 0:
    n = x * 2 * c
    m = x * a + y * b
    p += min(n,m)

print(p)