Description

首先你會有一個數字 $N$,假如 $N$ 是偶數,就換成 $N/2$, 假如是奇數那就換成 $3N+1$,不斷重複這操作, 最後當數字變成1時做了多少次操作?

Input Format

每個測資會有一個數字

Output Format

輸出步驟數

Sample Input 1

4

Sample Output 1

2

Sample Input 2

11

Sample Output 2

14

Hints

Problem Source

NEOJ Problem 3023

Subtasks

No. Testdata Range Constraints Score
1 0 10
2 1 10
3 2 10
4 3 10
5 4 10
6 5 10
7 6 10
8 7 10
9 8 10
10 9 10

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1000 65536 65536 1
1 1000 65536 65536 2
2 1000 65536 65536 3
3 1000 65536 65536 4
4 1000 65536 65536 5
5 1000 65536 65536 6
6 1000 65536 65536 7
7 1000 65536 65536 8
8 1000 65536 65536 9
9 1000 65536 65536 10