406338: GYM102365 H Ancient Wisdom

Memory Limit:1024 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

H. Ancient Wisdomtime limit per test1 secondmemory limit per test1024 megabytesinputstandard inputoutputstandard output

David and Aram had the following conversation:

David: "Aram, you're pretty old."

Aram: "I'm not THAT old. If you cube your age and then multiply by $$$C$$$, you'd get exactly my age squared."

Lucca overheard this conversation but isn't sure if he caught the right value for $$$C$$$. Help Lucca figure out how young David could be, assuming he heard correctly.

As everyone knows, ages are positive integers.

Input

Input is a single integer, what Lucca thought he heard for the value of $$$C$$$ $$$(1\le C < 2^{63})$$$.

Output

Output the minimum age David could be.

ExamplesInput
1029
Output
21
Input
10
Output
10
Input
1000000000000000000
Output
1
Note

The average computer can do roughly $$$10^8$$$ elementary operations in one second. If you submit a program that tries to do more than $$$10^9$$$ operations, you shouldn't be surprised if your program gets a Time Limit Exceeded verdict!

加入题单

算法标签: