#ABC095C 全列挙

def main():

    import sys, math

    A,B,C,X,Y = list(map(int, sys.stdin.readline().split()))

    ans = float('inf')

    for i in range(10**5+1):

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

        ans = min(tmp, ans)

        if i > X and i > Y:

            break

    print(ans)  



if __name__=='__main__':

    main()

#ABC095C

def main():

    import sys

    A,B,C,X,Y = list(map(int, sys.stdin.readline().split()))

    # cをi枚とする

    ans = -1

    for i in range(0, 2*10**5+1, 2):

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

        if ans ==-1 or ans > tmp:

            ans = tmp

    print(ans)

    

   

    

if __name__=='__main__':

    main()

# ABC095C 全列挙
def main():
    import sys, math

    A, B, C, X, Y = list(map(int, sys.stdin.readline().split()))
    ans = float("inf")
    for i in range(10**5 + 1):
        tmp = i * 2 * C + max(0, (X - i) * A) + max(0, (Y - i) * B)
        ans = min(tmp, ans)
        if i > X and i > Y:
            break
    print(ans)


if __name__ == "__main__":
    main()

# ABC095C
def main():
    import sys

    A, B, C, X, Y = list(map(int, sys.stdin.readline().split()))
    # cをi枚とする
    ans = -1
    for i in range(0, 2 * 10**5 + 1, 2):
        tmp = max((X - i // 2) * A, 0) + i * C + max((Y - i // 2) * B, 0)
        if ans == -1 or ans > tmp:
            ans = tmp
    print(ans)


if __name__ == "__main__":
    main()

-# ABC095C 全列挙 +# ABC095C -    import sys, math +    import sys -    ans = float("inf") -    for i in range(10**5 + 1): -        tmp = i * 2 * C + max(0, (X - i) * A) + max(0, (Y - i) * B) -        ans = min(tmp, ans) -        if i > X and i > Y: -            break +    # cをi枚とする +    ans = -1 +    for i in range(0, 2 * 10**5 + 1, 2): +        tmp = max((X - i // 2) * A, 0) + i * C + max((Y - i // 2) * B, 0) +        if ans == -1 or ans > tmp: +            ans = tmp