object Main extends App {
  val s = io.StdIn.readLine
  val a = s(0).asDigit
  val b = s(1).asDigit
  val c = s(2).asDigit
  val d = s(3).asDigit

  val ope = Seq("+", "-")
  val results = for {
    ope1 <- ope
    ope2 <- ope
    ope3 <- ope
    if ((ope1, ope2, ope3) match {
      case ("+","+","+") => a+b+c+d
      case ("+","+","-") => a+b+c-d
      case ("+","-","+") => a+b-c+d
      case ("+","-","-") => a+b-c-d
      case ("-","+","+") => a-b+c+d
      case ("-","+","-") => a-b+c-d
      case ("-","-","+") => a-b-c+d
      case ("-","-","-") => a-b-c-d
    }) == 7
  } yield s"$a$ope1$b$ope2$c$ope3$d=7"

  println(results.head)
}