import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean[] A = new boolean[10000];
        for(int i = 0;i < 10000;i++)A[i] = false;
        int count = 1;
        A[n - 1] = true;
        while(true){
            if(n % 2 == 0) n /= 2;
            else n = 3 * n + 1;
            if(A[n - 1] == true){
                break;
            }else{
                A[n - 1] = true;
                count += 1;
            }
        }
        System.out.println(count + 1);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean[] A = new boolean[10000];
        for(int i = 0;i < 10000;i++)A[i] = false;
        int count = 1;
        A[n - 1] = true;
        while(true){
            if(n % 2 == 0) n /= 2;
            else n = 3 * n + 1;
            if(A[n - 1] == true){
                break;
            }else{
                A[n - 1] = true;
                count += 1;
            }
        }
        System.out.println(count + 1);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean[] A = new boolean[10000];
        for(int i = 0;i < 10000;i++)A[i] = false;
        int count = 1;
        A[n - 1] = true;
        while(true){
            if(n % 2 == 0) n /= 2;
            else n = 3 * n + 1;
            if(A[n - 1] == true){
                break;
            }else{
                A[n - 1] = true;
                count += 1;
            }
        }
        System.out.println(count + 1);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean[] A = new boolean[10000];
        for(int i = 0;i < 10000;i++)A[i] = false;
        int count = 1;
        A[n - 1] = true;
        while(true){
            if(n % 2 == 0) n /= 2;
            else n = 3 * n + 1;
            if(A[n - 1] == true){
                break;
            }else{
                A[n - 1] = true;
                count += 1;
            }
        }
        System.out.println(count + 1);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc boolean[] A = new boolean[10000]; A new boolean[10000] 10000 for(int i = 0;i < 10000;i++)A[i] = false; int i = 0; int i = 0; i 0 i < 10000 i 10000 i++ i++ i A[i] = false; A[i] = false A[i] A i false int count = 1; count 1 A[n - 1] = true A[n - 1] A n - 1 n 1 true while(true){
            if(n % 2 == 0) n /= 2;
            else n = 3 * n + 1;
            if(A[n - 1] == true){
                break;
            }else{
                A[n - 1] = true;
                count += 1;
            }
        } true {
            if(n % 2 == 0) n /= 2;
            else n = 3 * n + 1;
            if(A[n - 1] == true){
                break;
            }else{
                A[n - 1] = true;
                count += 1;
            }
        } if(n % 2 == 0) n /= 2;
            else n = 3 * n + 1; n % 2 == 0 n % 2 n 2 0 n /= 2 n 2 n = 3 * n + 1 n 3 * n + 1 3 * n 3 n 1 if(A[n - 1] == true){
                break;
            }else{
                A[n - 1] = true;
                count += 1;
            } A[n - 1] == true A[n - 1] A n - 1 n 1 true {
                break;
            } break; {
                A[n - 1] = true;
                count += 1;
            } A[n - 1] = true A[n - 1] A n - 1 n 1 true count += 1 count 1 System.out.println(count + 1) System.out.println System.out System System.out count + 1 count 1 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean[] A = new boolean[10000];
        for(int i = 0;i < 10000;i++)A[i] = false;
        int count = 1;
        A[n - 1] = true;
        while(true){
            if(n % 2 == 0) n /= 2;
            else n = 3 * n + 1;
            if(A[n - 1] == true){
                break;
            }else{
                A[n - 1] = true;
                count += 1;
            }
        }
        System.out.println(count + 1);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean[] A = new boolean[10000];
        for(int i = 0;i < 10000;i++)A[i] = false;
        int count = 1;
        A[n - 1] = true;
        while(true){
            if(n % 2 == 0) n /= 2;
            else n = 3 * n + 1;
            if(A[n - 1] == true){
                break;
            }else{
                A[n - 1] = true;
                count += 1;
            }
        }
        System.out.println(count + 1);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        boolean[] A = new boolean[10000];
        for(int i = 0;i < 10000;i++)A[i] = false;
        int count = 1;
        A[n - 1] = true;
        while(true){
            if(n % 2 == 0) n /= 2;
            else n = 3 * n + 1;
            if(A[n - 1] == true){
                break;
            }else{
                A[n - 1] = true;
                count += 1;
            }
        }
        System.out.println(count + 1);
    }
}