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

if 2*c >= a+b:
    print(a*x+b*y)
else:
    if 2*c <=a or 2*c <=b:
        print(2*c*(max(x,y)))
    else:
        if x>=y:
            print(2*c*y+a*(x-y))
        else:
            print(2*c*x+a*(y-x))