#include <bits/stdc++.h>

typedef long long ll;
typedef unsigned long long ull;

#define FOR(i,a,b) for(int (i)=(a);i<(b);i++)
#define REP(i,n) FOR(i,0,n)
#define RANGE(vec) (vec).begin(),(vec).end()

using namespace std;


class Yuki0010
{
public:
    void solve(void)
    {
            int N,Total;
            cin>>N>>Total;

            vector<int> A(N);
            REP(i,N) cin>>A[i];

            vector<vector<bool>> dp(N+1, vector<bool>(Total+1, false));
            dp[0][A[0]] = true;

            REP(i,N-1)
            {
                REP(s,Total+1)
                {
                    if ( !dp[i][s] )
                        continue;
                    int a = A[i+1];
                    if ( s+a <= Total )
                        dp[i+1][s+a] = true;
                    if ( s*a <= Total )
                        dp[i+1][s*a] = true;
                }
            }
            vector<string> ans;
            set<string> vis;
            function<void(int,int,string)> collect = [&](int s, int k, string str)
            {
                if ( vis.count(str) )
                    return;
                vis.insert(str);
                if ( s > Total )
                    return;
                if ( k > N-1 )
                    return;
                if ( !dp[k][s] )
                    return;
                if ( k == N-1 )
                {
                    if ( s == Total )
                    {
                        ans.push_back(str);
                        return;
                    }
                    return;
                }
                collect(s+A[k+1], k+1, str+'+');
                collect(s*A[k+1], k+1, str+'*');
            };
            collect(A[0], 0, "");
            sort(RANGE(ans));
            reverse(RANGE(ans));
            cout<<ans[0]<<endl;
    }
};

#if 1
int main(int argc, char *argv[])
{
        ios::sync_with_stdio(false);
        auto obj = new Yuki0010();
        obj->solve();
        delete obj;
        return 0;
}
#endif