In a math lesson, Baytik learned how to multiply and began applying this operation to various numbers. For instance, he split a number into its digits and calculated the product of these digits. Now he is interested in finding the largest product of digits among natural numbers that do not exceed . Help him solve this problem.
The input contains a single integer (1 \leq N \leq 2 \cdot 10^9).
Print the maximum product of digits among all numbers not exceeding .
Example 1