Question
Power House

You are given two integers KaTeX can only parse string typed expression and KaTeX can only parse string typed expression. Your task is to find the power of KaTeX can only parse string typed expression (i.e., KaTeX can only parse string typed expression for some integer KaTeX can only parse string typed expression) that is closest to KaTeX can only parse string typed expression.

If two powers are equally close, print the smaller one. The power of KaTeX can only parse string typed expression can be either less than or greater than KaTeX can only parse string typed expression.

Input
The first line contains two integers KaTeX can only parse string typed expression and KaTeX can only parse string typed expression.
Output
Print a single integer — the value of KaTeX can only parse string typed expression that is closest to KaTeX can only parse string typed expression.
Example
Input
20 3

Output
27

Explanation
Powers of 3 are: KaTeX can only parse string typed expression
The closest to 20 are KaTeX can only parse string typed expression and KaTeX can only parse string typed expression.
KaTeX can only parse string typed expression and KaTeX can only parse string typed expression.
Since 27 is closer, the answer is 27.

Online