# -*- coding: utf-8 -*-
"""
Created on Tue Mar 31 10:33:57 2020

@author: black
"""


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


a_num = X
b_num = Y
c_num = 0
total = A*a_num + B*b_num + C*c_num

ans = 10**10
if A + B <= 2*C:
    ans = total
elif min(A, B) * 2 >= 2 * C:
    a_num = 0
    b_num = 0
    c_num = max(X, Y)
    ans = C*c_num
elif A + B > 2*C and 2*C > min(A, B)*2:
    MAX = max(X,Y)
    MIN = min(X,Y)
    for i in range(MIN, MAX+1):
        a_num = max(X-i, 0)
        b_num = max(Y-i, 0)
        c_num = 2*i
        total = A*a_num + B*b_num + C*c_num
        ans = min(ans, total)
print(ans)