We’re preparing your current view and syncing the latest data.
Two bears, Limak and Bob, have populations represented by integers A and B respectively. Each year, Limak's population triples, and Bob's population doubles. The task is to determine the minimum number of full years after which Limak's population will become strictly greater than Bob's population.
The input consists of two integers A and B, where A is the initial population of Limak and B is the initial population of Bob.
Print a single integer — the number of full years after which Limak's population becomes strictly greater than Bob's.
1 <= A, B <= 10^4
Example 1
Input
4 7
Output
2
Explanation
Initially Limak = 4, Bob = 7 After 1 year: Limak = 4 * 3 = 12, Bob = 7 * 2 = 14 (Limak <= Bob) After 2 years: Limak = 12 * 3 = 36, Bob = 14 * 2 = 28 (Limak > Bob) Hence, the answer is 2.