#  095C

import sys

A,B,C,x,y = list(map(int, sys.stdin.readline().split()))



ans = float('inf')

for i in range(0, 2*max(x, y)+1, 2):

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

    #print(tmp, i)

    if ans > tmp:

        ans = tmp

print(ans)
#ABC095C

def main():

    import sys, math

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

    L =[]

    #全部C

    L.append(max(X, Y)*2*C)

    

    #できるだけC 不足分A,B

    if X <= Y:

        L +=[X*2*C + (Y-X)*B]

    else:

        L +=[Y*2*C + (X-Y)*A]

    

    #全部A,B

    L.append(A*X+B*Y)

    print((min(L)))





if __name__=='__main__':

    main()

#  095C
import sys

A, B, C, x, y = list(map(int, sys.stdin.readline().split()))
ans = float("inf")
for i in range(0, 2 * max(x, y) + 1, 2):
    tmp = A * max(x - i // 2, 0) + C * i + B * max(y - i // 2, 0)
    # print(tmp, i)
    if ans > tmp:
        ans = tmp
print(ans)

# ABC095C
def main():
    import sys, math

    A, B, C, X, Y = list(map(int, sys.stdin.readline().split()))
    L = []
    # 全部C
    L.append(max(X, Y) * 2 * C)
    # できるだけC 不足分A,B
    if X <= Y:
        L += [X * 2 * C + (Y - X) * B]
    else:
        L += [Y * 2 * C + (X - Y) * A]
    # 全部A,B
    L.append(A * X + B * Y)
    print((min(L)))


if __name__ == "__main__":
    main()

-#  095C -import sys +# 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(0, 2 * max(x, y) + 1, 2): -    tmp = A * max(x - i // 2, 0) + C * i + B * max(y - i // 2, 0) -    # print(tmp, i) -    if ans > tmp: -        ans = tmp -print(ans) +    A, B, C, X, Y = list(map(int, sys.stdin.readline().split())) +    L = [] +    # 全部C +    L.append(max(X, Y) * 2 * C) +    # できるだけC 不足分A,B +    if X <= Y: +        L += [X * 2 * C + (Y - X) * B] +    else: +        L += [Y * 2 * C + (X - Y) * A] +    # 全部A,B +    L.append(A * X + B * Y) +    print((min(L))) + + +if __name__ == "__main__": +    main()