program main
implicit none
integer :: i, j, k
integer :: a, b, c, d, e
character :: s*11, op(2)*1

op = (/'+','-'/)
read(*,*) e
a = e/1000
b = (e-a*1000)/100
c = (e-a*1000-b*100)/10
d = (e-a*1000-b*100-c*10)/1


do i = 1, 2
   do j = 1, 2
      do k = 1, 2
         if( a+b*(-1)**(i+1)+c*(-1)**(j+1)+d*(-1)**(k+1) == 7 ) then
            write(s,"(i1.1,a1,i1.1,a1,i1.1,a1,i1.1,'=7')") a, op(i), b, op(j), c, op(k), d
            write(*,*) s
            stop
         end if         
      end do
   end do
end do
end program main
