Weigh-cones#1294

Weigh-cones

1 second
64 megabytes
Very easy

One day, Mike brought back 8 cones from the forest. He noticed that one of them was heavier than the others. Now he wants to find out which one, but all the cones have already been stacked into one pile. Since Mike was going to watch the next football match of the Champions League, he asked Orysia to do it for him using balance scales without weights. Orysia, however, wanted to go for another walk with her mobile phone, so she wanted to finish Mike's task as quickly as possible.

She quickly realized that with 8 cones, she needed only 2 weighings and was ready to go for her walk. But then Mike, remembering how he suffered during the previous football match and Orysia's walk, gave her several more piles, each of which also had exactly one heavier cone. Help Orysia finish quickly so she can go for a walk by finding the heavier cone in each pile with the minimum number of weighings.

Input

The input data contains several test cases. Each test case is located on a separate line and contains a single integer – the number of cones in the current pile (0 \le n \le 2 \cdot 10^4).

Output

For each test case, output the required minimum number of weighings on a separate line.

Examples

Example 1

Loading
Loading