def main():

    A, B, C, X, Y = (int(i) for i in input().split())

    ans1 = A * X + B * Y

    ans2 = 0

    ans3 = 0

    if X < Y:

        ans2 += 2 * C * X

        ans2 += B * (Y-X)

        ans3 += 2 * C * Y

    else:

        ans2 += 2 * C * Y

        ans2 += A * (X-Y)

        ans3 += 2 * C * X



    print((min(ans1,ans2,ans3)))



if __name__ == '__main__':

    main()
def main():

    a, b, c, x, y = (int(i) for i in input().split())

    ans = 0

    if x > y:

        p = (x - y)*a

    elif y > x:

        p = (y - x)*b

    else:

        p = 0

    print((min(a*x + b*y, 2*c*max(x, y), 2*c*min(x, y) + p)))





if __name__ == '__main__':

    main()

def main():
    A, B, C, X, Y = (int(i) for i in input().split())
    ans1 = A * X + B * Y
    ans2 = 0
    ans3 = 0
    if X < Y:
        ans2 += 2 * C * X
        ans2 += B * (Y - X)
        ans3 += 2 * C * Y
    else:
        ans2 += 2 * C * Y
        ans2 += A * (X - Y)
        ans3 += 2 * C * X
    print((min(ans1, ans2, ans3)))


if __name__ == "__main__":
    main()

def main():
    a, b, c, x, y = (int(i) for i in input().split())
    ans = 0
    if x > y:
        p = (x - y) * a
    elif y > x:
        p = (y - x) * b
    else:
        p = 0
    print((min(a * x + b * y, 2 * c * max(x, y), 2 * c * min(x, y) + p)))


if __name__ == "__main__":
    main()

-    A, B, C, X, Y = (int(i) for i in input().split()) -    ans1 = A * X + B * Y -    ans2 = 0 -    ans3 = 0 -    if X < Y: -        ans2 += 2 * C * X -        ans2 += B * (Y - X) -        ans3 += 2 * C * Y +    a, b, c, x, y = (int(i) for i in input().split()) +    ans = 0 +    if x > y: +        p = (x - y) * a +    elif y > x: +        p = (y - x) * b -        ans2 += 2 * C * Y -        ans2 += A * (X - Y) -        ans3 += 2 * C * X -    print((min(ans1, ans2, ans3))) +        p = 0 +    print((min(a * x + b * y, 2 * c * max(x, y), 2 * c * min(x, y) + p)))