A calibration routine needs the floor of a k-th root without using floating-point math. Given a non-negative integer n and a positive integer k, find the largest whole number x such that x raised to the power k is at most n.
Because floating-point roots can be off by one near exact powers, you must determine x exactly.
Input format
A single line with two integers n and k.
Output format
A single integer: the largest x with x**k <= n.
Constraints
- 0 <= n <= 1000000
- 1 <= k <= 30