Expressions Matter


Submit solution

Points: 1
Time limit: 2.0s
Memory limit: 256M

Problem type
Allowed languages
Python

Write a program that reads three integers, a, b, and c.

You may combine them using addition, multiplication, and brackets.

Print the largest possible value.

The possible expressions are:

  • a + b + c
  • a * b * c
  • (a + b) * c
  • a * (b + c)
  • a + b * c
  • a * b + c

Input

The input contains three integers, a, b, and c, on one line.

Output

Output the largest possible value.

Sample Input

1 2 3

Sample Output

9

Comments

There are no comments at the moment.