beginners-task-5-2

The task of beginners' is to find the maximum value which can be obtained by numbers x, y, z. Maximum Value can be obtained by inserting sign of operations '+' and ''*, and  brackets between the numbers so that the resulting value  is as large as possible.
Example:
Let x,y,z be 2, 3,4 respectively. Some ways of obtaining maximum value are:  

2+3*4=14  
2*(3+4)=14  
2*3*4=24  
2+3+4=9

You can insert operation signs only between  x and y , and between y and z. You cannot swap numbers. Like (2+4)*3 is not allowed

The maximum value obtained in above example is 24.

Input
The input contains three integers x, y and z, each on a single line (1 ≤ x,y,z ≤ 10).

Output
Print the maximum value that you can obtain.

SAMPLE INPUT
1
2
3

SAMPLE OUTPUT
9

Source: hackerearth | Difficulty: UNKNOWN_DIFFICULTY


Solutions: