program prob3
    implicit none
    integer::N, i,j,a,b,c,d,tmp,e
    character(len=9)::S
    integer::v(4)
    read(*,*) N
    a = N/1000
    N = N - N/1000*1000
    b = N/100
    N = N - N/100*100
    c = N/10
    N = N - N/10*10
    d = N
    v(1) = a
    v(2) = b
    v(3) = c
    v(4) = d
    S(1:1) = char(ichar('0')+a)
    S(3:3) = char(ichar('0')+b)
    S(5:5) = char(ichar('0')+c)
    S(7:7) = char(ichar('0')+d)
    S(9:9) = char(ichar('0')+7)
    S(8:8) = "="
    do i = 0,7
        tmp = i
        e = 0
        do j = 2,0,-1
            if(tmp >= 2**j) then
                e = e + v(j+2) 
                tmp = tmp - 2**j
                S(2*j+2:2*j+2) = "+"
            else
                e = e - v(j+2)
                S(2*j+2:2*j+2) = "-"
            end if
        end do
        e = e + v(1)
        if(e == 7)then
            write(*,'(a)') S
            stop
        end if
    end do
end program