program prob3
    implicit none
    integer :: a,e,i,test,tmp,j
    character(20) :: s
    integer :: b(3)
    read(*,*) e
    b(3) = mod(e, 10)
    e = e / 10
    b(2) = mod(e, 10)
    e = e / 10
    b(1) = mod(e, 10)
    e = e / 10
    a = mod(e, 10)
    e = e / 10
    
    do i = 0, 7
        test = a
        tmp = i
        do j = 1, 3
            if(mod(tmp, 2) == 1) then
                test = test + b(j)
            else
                test = test - b(j)
            end if
            tmp = tmp / 2
        end do
        if(test == 7) then
            write(s,*) a
            write(*,'(a)',advance='no') trim(adjustl(s))
            tmp = i
            do j = 1, 3
                if(mod(tmp, 2) == 1) then
                    write(*,'(a)',advance='no') '+'
                    write(s,*) b(j) 
                    write(*,'(a)',advance='no') trim(adjustl(s))
                else
                    write(*,'(a)',advance='no') '-'
                    write(s,*) b(j) 
                    write(*,'(a)',advance='no') trim(adjustl(s))
                end if
                tmp = tmp /2
            end do
            exit
        end if
    end do

    write(*,'(a)',advance='no') '=7'
    write(*,*) 
    stop
contains
end program prob3