Problems

# Weighing

# Weighing

**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.

#### Input

One integer **n** (**2** ≤ **n** ≤ `10`

).^{9}

#### Output

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

Input example #1

2

Output example #1

1

Input example #2

4

Output example #2

2

Input example #3

9

Output example #3

2