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

result=[]
if (a <= c <= b) or (b <= c <= a):
    if a > b :
        for i in range(2 * max(x,y),-1,-2):
            for j in range(0,x+1):
                if j + i // 2 == x:
                    # print('first')
                    # print(i,j)
                    if y > i // 2:
                        b_num = y - i // 2
                        result.append(a * ( x - i // 2 ) + b * b_num + c * i)
                    else:
                        b_num = i // 2
                        result.append(a * ( x - i // 2 ) + b * b_num + c * i)
                else:
                    continue
    else:
        for i in range(2 * max(x,y),-1,-2):
            for j in range(0,y+1):
                if j + i // 2 == y:
                    # print('second')
                    # print(i,j)
                    if x > i // 2:
                        a_num = x - i // 2
                        result.append(a * a_num + b * ( y - i // 2 ) + c * i)
                    else:
                        a_num = i // 2
                        result.append(a * a_num + b * ( y - i // 2 ) + c * i)
                else:
                    continue
elif(c > a and c > b):
    result.append(a * x + b * y)
else:
    result.append(c * 2 * max(x,y))
    
            
print(min(result))
