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

if c*2 <= a+b:
    while 0<min(x,y):
        x -= 1
        y -= 1
        ans += c*2
    if 0 < a and a*c*2 < a*x:
        ans += (c*x*2)
    elif 0 < b and b*c*2 < b*y:
        ans += (c*y*2)
    else:
        ans += (a*x)+(b*y)
else:
    ans = (a*x)+(b*y)

print(ans)