Problems

# Weighing

n balls are given. n1 of them have the same weight, and one is heavier. Find the minimum number of weighings required to determine which ball is heavier using a two pan balance. Weighing operation is described as follows: the same amount of balls is placed on each of the two pans. If one pan outweigh the other, the heavy ball lies on the first one. If the pans in balance, the heavy ball is out of pans. After each weighing the decision is made which balls will participate in the next weighting.

#### Input

One integer n (2n109).

#### Output

Print the minimum number of weighings to find the heavy ball.

Time limit 1 second
Memory limit 128 MiB
Input example #1
2

Output example #1
1

Input example #2
4

Output example #2
2

Input example #3
9

Output example #3
2