a,b,c,x,y = map(int,input().split())
m = 0
if a + b <= 2*c:
    m += (a+b) * min(x,y)
else:
    m += c * 2 * min(x,y)

if x > y:
    if a <= 2*c:
        m += a * (x-y)
    else:
        m += c * 2 * (x-y)


else:
     if b <= 2*c:
         m += b * (y-x)
     else:
         m += c * 2 * (y-x)

print(m)
