#pragma region ヘッダー
#define _CRT_SECURE_NO_WARNINGS

#ifdef _____MY_DEBUG_____
#define VS_ENDPAUSE()	(system("pause"))
#define DEBUG_OUT(...)  (printf(__VA_ARGS__))
#else
#define VS_ENDPAUSE()
#define DEBUG_OUT(...)
#endif

#include <stdio.h>
#include <string.h>
#include <iostream>
#include <math.h>
#include <cmath>
#include <vector>
#include <algorithm>
#include <string>
#include <functional>

using namespace std;
typedef signed char int8;
typedef signed short int16;
typedef signed int int32;
typedef signed long long int64;
typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int uint32;
typedef unsigned long long uint64;
//#define int int64

#ifndef INT8_MIN
#define INT8_MIN	(-127)
#endif
#ifndef INT8_MAX
#define INT8_MAX	( 128)
#endif
#ifndef UINT8_MAX
#define UINT8_MAX	( 255)
#endif
#ifndef INT16_MIN
#define INT16_MIN	(-32768)
#endif
#ifndef INT16_MAX
#define INT16_MAX	( 32767)
#endif
#ifndef UINT16_MAX
#define UINT16_MAX	( 65535)
#endif
#ifndef INT32_MIN
#define INT32_MIN	(-2147483648)	// -2 * 10^9
#endif
#ifndef INT32_MAX
#define INT32_MAX	( 2147483647)	//  2 * 10^9
#endif
#ifndef UINT32_MAX
#define UINT32_MAX	( 4294967295)	//  4 * 10^9
#endif
#ifndef INT64_MIN
#define INT64_MIN	(-9223372036854775808)	// -9 * 10^18
#endif
#ifndef INT64_MAX
#define INT64_MAX	( 9223372036854775807)	//  9 * 10^18
#endif
#ifndef UINT64_MAX
#define UINT64_MAX	( 18446744073709551615)	// 18 * 10^18
#endif

void func(void);
#pragma endregion

int32 main(void)
{
    func();
    VS_ENDPAUSE();
    return 0;
}


double operato(double a, char ope, double b)
{
    double ans;
    if(ope == '+'){
        ans = a + b;
    }else if(ope == '-'){
        ans = a - b;
    }else if(ope == '*'){
        ans = a * b;
    }else{
        if(b >= -0.000001 && b <= 0.000001){
            ans = -99999.012345;
        }else{
            ans = a / b;
        }
    }
    return ans;
}
double calc(string &formula)
{    char ope1 = formula[1];
    bool ope1_pm = (ope1=='+' || ope1=='-') ? true : false; // plus or minus
    char ope2 = formula[3];
    bool ope2_pm = (ope2=='+' || ope2=='-') ? true : false; // plus or minus
    char ope3 = formula[5];
    bool ope3_pm = (ope3=='+' || ope3=='-') ? true : false; // plus or minus
    double a = (double)(formula[0] - '0');
    double b = (double)(formula[2] - '0');
    double c = (double)(formula[4] - '0');
    double d = (double)(formula[6] - '0');

    double ans = 0;
    //1
    if(ope1_pm && ope2_pm && ope3_pm){
        ans = operato(a, ope1, b);
        ans = operato(ans, ope2, c);
        ans = operato(ans, ope3, d);
    }else
    //2
    if(ope1_pm && ope2_pm && !ope3_pm){
        if(ope2 == '-'){
            c = -1.0 * c;
            ope2 = '+';
        }
        ans = operato(c, ope3, d);
        ans = operato(b, ope2, ans);
        ans = operato(a, ope1, ans);
    }else
    //3
    if(ope1_pm && !ope2_pm && ope3_pm){
        if(ope1 == '-'){
            b = -1.0 * b;
            ope1 = '+';
        }
        ans = operato(b, ope2, c);
        ans = operato(a, ope1, ans);
        ans = operato(ans, ope3, d);
    }else
    //4
    if(ope1_pm && !ope2_pm && !ope3_pm){
        if(ope1 == '-'){
            b = -1.0 * b;
            ope1 = '+';
        }
        ans = operato(b, ope2, c);
        ans = operato(ans, ope3, d);
        ans = operato(a, ope1, ans);
    }else
    //5
    if(!ope1_pm && ope2_pm && ope3_pm){
        ans = operato(a, ope1, b);
        ans = operato(ans, ope2, c);
        ans = operato(ans, ope3, d);
    }else
    //6
    if(!ope1_pm && ope2_pm && !ope3_pm){
        if(ope2 == '-'){
            c = -1.0 * c;
            ope2 = '+';
        }
        ans = operato(operato(a, ope1, b), ope2, operato(c, ope3, d));
    }else
    //7
    if(!ope1_pm && !ope2_pm && ope3_pm){
        ans = operato(a, ope1, b);
        ans = operato(ans, ope2, c);
        ans = operato(ans, ope3, d);
    }else
    //8
    {
        ans = operato(a, ope1, b);
        ans = operato(ans, ope2, c);
        ans = operato(ans, ope3, d);
    }
    return ans;
}

void func(void)
{
//DEBUG_OUT("----\n");
    string abcd;
    cin >> abcd;

    string ope = "+-";

    for(int i=0; i<2; i++){
        for(int j=0; j<2; j++){
            for(int k=0; k<2; k++){
                string formula = "0123456";
                formula[0] = abcd[0];
                formula[1] = ope[i];
                formula[2] = abcd[1];
                formula[3] = ope[j];
                formula[4] = abcd[2];
                formula[5] = ope[k];
                formula[6] = abcd[3];
                double ans = calc(formula);
                if(ans >= 7.0-0.0000001 && ans <= 7.0+0.0000001){
                    cout << formula << "=7" << endl;
                    return;
                }
            }
        }
    }
    DEBUG_OUT("No ans\n");
}




Measured memory_bytes: 256