#n=int(input())

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

#al=list(map(int,input().split()))

#l=[list(map(int,input().split())) for i in range(m)]

ans=a*x+b*y

for z in range(0,max(x,y)+1):

    ans=min(ans,2*z*c+max(x-z,0)*a+max(y-z,0)*b)



print(ans)





#n=int(input())

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

#hl=list(map(int,input().split()))

#l=[list(map(int,input().split())) for i in range(n)]

mn=A*X+B*Y

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

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



print(mn)
# n=int(input())
a, b, c, x, y = list(map(int, input().split()))
# al=list(map(int,input().split()))
# l=[list(map(int,input().split())) for i in range(m)]
ans = a * x + b * y
for z in range(0, max(x, y) + 1):
    ans = min(ans, 2 * z * c + max(x - z, 0) * a + max(y - z, 0) * b)
print(ans)

# n=int(input())
A, B, C, X, Y = list(map(int, input().split()))
# hl=list(map(int,input().split()))
# l=[list(map(int,input().split())) for i in range(n)]
mn = A * X + B * Y
for i in range(max(X, Y) + 1):
    mn = min(mn, 2 * i * C + A * max(0, X - i) + B * max(0, Y - i))
print(mn)

-a, b, c, x, y = list(map(int, input().split())) -# al=list(map(int,input().split())) -# l=[list(map(int,input().split())) for i in range(m)] -ans = a * x + b * y -for z in range(0, max(x, y) + 1): -    ans = min(ans, 2 * z * c + max(x - z, 0) * a + max(y - z, 0) * b) -print(ans) +A, B, C, X, Y = list(map(int, input().split())) +# hl=list(map(int,input().split())) +# l=[list(map(int,input().split())) for i in range(n)] +mn = A * X + B * Y +for i in range(max(X, Y) + 1): +    mn = min(mn, 2 * i * C + A * max(0, X - i) + B * max(0, Y - i)) +print(mn)