
import math
def half_and_half(a,b,c,x,y):
    #z = x * 2  if a > b else y *2
    z = x   if a > b else y
    can = []
    
    for n in range(z,-1,-1):
        #p = x - n//2 if x > n//2 else 0
        #q = y - n//2 if y > n//2 else 0
        #amount = p*a + q*b + n*c
        p = x - n if x >= n else 0
        q = y - n if y >= n else 0
        amount = p*a + q*b + n*c*2
        #print("%d = %d x %d + %d x %d + %d x %d " %(amount,p,a,q,b,n,c))
        can.append(amount)

    #i * 2c + max(0,x-i)*a + max(0,y-i)*b
    print(min(can))
if __name__ == '__main__':
    a,b,c,x,y = map(int,input().split())
    half_and_half(a,b,c,x,y)
