program ABC095C
    implicit none
    integer(8)::A,B,C,X,Y
    read*,A,B,C,X,Y

    if(X<Y)then
        print'(i0)',min(A*X+B*Y,2*C*X+B*(Y-X),2*C*Y)
    else if(X>Y)then
        print'(i0)',min(A*X+B*Y,2*C*Y+A*(X-Y),2*C*X)
    else
        print'(i0)',min(A*X+B*Y,2*C*X)
    end if
end program ABC095C