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

if (a+b) <= c*2:
    print(a*x+b*y)
else:
    if x >= y:
        tmp1 = y*2*c + (x-y)*a
        tmp2 = c*x*2
        print(min(tmp1, tmp2))
    else:
        tmp1 = x * 2 * c + (y-x) * a
        tmp2 = c * y * 2
        print(min(tmp1, tmp2))
