#abc097b. [abc097_b]Exponential
[abc097_b]Exponential
Problem Statement
You are given a positive integer . Find the largest perfect power that is at most . Here, a perfect power is an integer that can be represented as , where is an integer not less than and is an integer not less than .
Constraints
- is an integer.
Input
Input is given from Standard Input in the following format:
Output
Print the largest perfect power that is at most .
Sample Input 1
10
Sample Output 1
9
There are four perfect powers that are at most : , , and . We should print the largest among them, .
Sample Input 2
1
Sample Output 2
1
Sample Input 3
999
Sample Output 3
961