import sys

input = lambda: sys.stdin.readline().rstrip() 



def resolve():

    A, B, C, X, Y = list(map(int, input().split()))



    ans = float('inf')

    for i in range(0, max(X, Y)*2+1, 2):

        ans = min(A*max(X-i//2, 0)+B*max(Y-i//2, 0)+C*i, ans)

    print(ans)



if __name__ == '__main__':

    resolve()

import sys

input = lambda: sys.stdin.readline().rstrip() 



def resolve():

    A, B, C, X, Y = list(map(int, input().split()))



    ans = 0

    if A+B > 2*C:

        ans = 2*C*min(X, Y)+min((A if X>Y else B)*abs(X-Y), 2*C*abs(X-Y))

    else:

        ans = A*X+B*Y

    

    print(ans)



if __name__ == '__main__':

    resolve()

import sys

input = lambda: sys.stdin.readline().rstrip()


def resolve():
    A, B, C, X, Y = list(map(int, input().split()))
    ans = float("inf")
    for i in range(0, max(X, Y) * 2 + 1, 2):
        ans = min(A * max(X - i // 2, 0) + B * max(Y - i // 2, 0) + C * i, ans)
    print(ans)


if __name__ == "__main__":
    resolve()

import sys

input = lambda: sys.stdin.readline().rstrip()


def resolve():
    A, B, C, X, Y = list(map(int, input().split()))
    ans = 0
    if A + B > 2 * C:
        ans = 2 * C * min(X, Y) + min(
            (A if X > Y else B) * abs(X - Y), 2 * C * abs(X - Y)
        )
    else:
        ans = A * X + B * Y
    print(ans)


if __name__ == "__main__":
    resolve()

-    ans = float("inf") -    for i in range(0, max(X, Y) * 2 + 1, 2): -        ans = min(A * max(X - i // 2, 0) + B * max(Y - i // 2, 0) + C * i, ans) +    ans = 0 +    if A + B > 2 * C: +        ans = 2 * C * min(X, Y) + min( +            (A if X > Y else B) * abs(X - Y), 2 * C * abs(X - Y) +        ) +    else: +        ans = A * X + B * Y