Problem Description

Starting from n, apply: if even n=n/2 else n=3n+1. Count steps to reach 1.

Input Format

One integer n.

Output Format

One integer steps.

Sample Test Case

Input:
6
Output:
8

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next