import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int a1 = sc.nextInt();
        int an = a1;
        int n = 1;
        int anArray[] = new int[1000000];
        anArray[0] = an;

        for (int i = 0; ; i++) {
            //System.out.println(an);

            if (an == 4 || an == 2 || an == 1) {
                System.out.println(n + 3);
                System.exit(0);
            }
            
            n += 1;
            if (an % 2 == 0) {
                an = an / 2;
            } else {
                an = 3 * an + 1;
            }

            //for (int j = 0; j < i; j++) {
            //    if (an == anArray[j]) {
            //        System.out.println(n);
            //        System.exit(0);
            //    }
            //}

            anArray[n - 1] = an;

            
        }
    }
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz