Given balls. Among them, n - 1 have the same weight, and one ball is heavier than the others. Determine the minimum number of weighings on a two-pan balance (without weights) required to find the heavy ball.
A weighing is performed as follows: the same number of balls is placed on each pan of the balance. If one pan is heavier than the other, the heavy ball is on the heavier pan. If the pans balance, the heavy ball is among the balls that were not placed on the balance. After each weighing, you choose which balls will participate in the next weighing.
One integer n~(2 \le n \le 10^9) — the number of balls.
Print the minimum number of weighings required to identify the heavy ball.
Example 1
Example 2
Example 3