Vanya is doing his maths homework. He has an expression of form <image>, where x1, x2, ..., xn are digits from 1 to 9, and sign <image> represents either a plus '+' or the multiplication sign '*'. Vanya needs to add one pair of brackets in this expression so that to maximize the value of the resulting expression.

Input

The first line contains expression s (1 ≤ |s| ≤ 5001, |s| is odd), its odd positions only contain digits from 1 to 9, and even positions only contain signs  +  and  * . 

The number of signs  *  doesn't exceed 15.

Output

In the first line print the maximum possible value of an expression.

Examples

Input

3+5*7+8*4


Output

303


Input

2+3*5


Output

25


Input

3*4*5


Output

60

Note

Note to the first sample test. 3 + 5 * (7 + 8) * 4 = 303.

Note to the second sample test. (2 + 3) * 5 = 25.

Note to the third sample test. (3 * 4) * 5 = 60 (also many other variants are valid, for instance, (3) * 4 * 5 = 60).
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Locale;
import java.util.StringTokenizer;

public class Main
{
    BigInteger f( String s, int b, int e, int sb, int se )
    {
        BigInteger ans = BigInteger.ZERO;
        BigInteger mul = BigInteger.valueOf( s.charAt( b ) - '0' );
        for( int i = b + 1; i <= e; i += 2 )
        {
            boolean isPlus = s.charAt( i ) == '+';
            BigInteger dig = BigInteger.valueOf( s.charAt( i + 1 ) - '0' );
            if( i == sb )
            {
                dig = f( s, sb + 1, se - 1, -1, -1 );
                i = se - 2;
            }
            if( isPlus )
            {
                ans = ans.add( mul );
                mul = dig;
            }
            else
            {
                mul = mul.multiply( dig );
            }
        }
        return ans.add( mul );
    }
    void solve() throws IOException
    {
        String s = "1*" + nextToken() + "*1";
        BigInteger ans = BigInteger.ZERO;
        for( int i = 0; i < s.length(); i++ ) if( s.charAt( i ) == '*' )
        {
            for( int j = i + 1; j < s.length(); j++ ) if( s.charAt( j ) == '*' )
            {
                ans = ans.max( f( s, 0, s.length() - 1, i, j ) );
            }
        }
        out.println( ans );
    }

    public static void main( String[] args )
    {
        new Main().run();
    }

    public void run()
    {
        try
        {
            Locale.setDefault( Locale.US );
            in = new BufferedReader( new InputStreamReader( System.in ) );
            out = new PrintWriter( System.out );
            st = null;
            solve();
        }
        catch( Exception e )
        {
            e.printStackTrace();
            System.exit( 1 );
        }
        finally
        {
            out.close();
        }
    }

    String nextToken() throws IOException
    {
        while( st == null || !st.hasMoreTokens() ) st = new StringTokenizer( in.readLine() );
        return st.nextToken();
    }

    int nextInt() throws IOException
    {
        return Integer.parseInt( nextToken() );
    }

    BufferedReader in;
    PrintWriter out;
    StringTokenizer st;
}