a,b,c,x,y = map(int,input().split())
if a + b < c * 2:
    print(a*x+b*y)
else:
    all_money = c * max([x, y]) * 2
    t=min([x,y])*c*2
    aa=abs(x-y)
    a_big_money = t + a * aa
    b_big_money = t + b * aa
    print(min([all_money,min(a_big_money,b_big_money)]))