LearnPy Hub
← Arena
AdvancedRating 2000

Egg Drop

With e eggs and a building of f floors, print the minimum number of drops that guarantees finding the highest safe floor in the worst case.

Input

e f (1 ≤ e ≤ 20, 1 ≤ f ≤ 10⁴).

Output

A number.

Sample 1

Input
1 2
Output
2

Sample 2

Input
2 6
Output
3
solution.py
Output appears here
Egg Drop · Python Arena problem · LearnPy Hub