n balls are given. n – 1 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.
One integer n (2 ≤ n ≤
Print the minimum number of weighings to find the heavy ball.