409832: GYM103800 I Ginger's balance

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

Description

I. Ginger's balancetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Ginger has a balance. Each plate can only hold $$$n$$$ items(the balance has two plates). Now Ginger has $$$m$$$ items, one of which is a light item, the rest of the items are the same weight, and Ginger wants to know the minimum number of times he weighs to be sure to find the bad item.

Input

The first line contains two integers $$$n$$$ $$$(1 \le n \le 10 ^ 4)$$$, $$$m$$$ $$$(1 \le m \le 10 ^ 6)$$$.

Output

Print the minimum times.

ExamplesInput
2 4
Output
2
Input
100 10
Output
3

加入题单

算法标签: