import java.util.*;
import static java.lang.Math.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a[] = new int[1000001];
        a[1] = sc.nextInt();
        for(int i=2; i<1000001; i++){
            if(a[i-1]%2 == 0){
                a[i] = a[i -1] / 2;
            }else{
                a[i] = 3 * a[i-1] + 1;
            }
            for(int j=1; j<i; j++){
                if(a[i] == a[j]){
                    System.out.println(i);
                    return;
                }
            }
        }
    }
} import java.util.*; util.* java import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a[] = new int[1000001];
        a[1] = sc.nextInt();
        for(int i=2; i<1000001; i++){
            if(a[i-1]%2 == 0){
                a[i] = a[i -1] / 2;
            }else{
                a[i] = 3 * a[i-1] + 1;
            }
            for(int j=1; j<i; j++){
                if(a[i] == a[j]){
                    System.out.println(i);
                    return;
                }
            }
        }
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a[] = new int[1000001];
        a[1] = sc.nextInt();
        for(int i=2; i<1000001; i++){
            if(a[i-1]%2 == 0){
                a[i] = a[i -1] / 2;
            }else{
                a[i] = 3 * a[i-1] + 1;
            }
            for(int j=1; j<i; j++){
                if(a[i] == a[j]){
                    System.out.println(i);
                    return;
                }
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int a[] = new int[1000001];
        a[1] = sc.nextInt();
        for(int i=2; i<1000001; i++){
            if(a[i-1]%2 == 0){
                a[i] = a[i -1] / 2;
            }else{
                a[i] = 3 * a[i-1] + 1;
            }
            for(int j=1; j<i; j++){
                if(a[i] == a[j]){
                    System.out.println(i);
                    return;
                }
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a[] = new int[1000001]; a new int[1000001] 1000001 a[1] = sc.nextInt() a[1] a 1 sc.nextInt() sc.nextInt sc for(int i=2; i<1000001; i++){
            if(a[i-1]%2 == 0){
                a[i] = a[i -1] / 2;
            }else{
                a[i] = 3 * a[i-1] + 1;
            }
            for(int j=1; j<i; j++){
                if(a[i] == a[j]){
                    System.out.println(i);
                    return;
                }
            }
        } int i=2; int i=2; i 2 i<1000001 i 1000001 i++ i++ i {
            if(a[i-1]%2 == 0){
                a[i] = a[i -1] / 2;
            }else{
                a[i] = 3 * a[i-1] + 1;
            }
            for(int j=1; j<i; j++){
                if(a[i] == a[j]){
                    System.out.println(i);
                    return;
                }
            }
        } {
            if(a[i-1]%2 == 0){
                a[i] = a[i -1] / 2;
            }else{
                a[i] = 3 * a[i-1] + 1;
            }
            for(int j=1; j<i; j++){
                if(a[i] == a[j]){
                    System.out.println(i);
                    return;
                }
            }
        } if(a[i-1]%2 == 0){
                a[i] = a[i -1] / 2;
            }else{
                a[i] = 3 * a[i-1] + 1;
            } a[i-1]%2 == 0 a[i-1]%2 a[i-1] a i-1 i 1 2 0 {
                a[i] = a[i -1] / 2;
            } a[i] = a[i -1] / 2 a[i] a i a[i -1] / 2 a[i -1] a i -1 i 1 2 {
                a[i] = 3 * a[i-1] + 1;
            } a[i] = 3 * a[i-1] + 1 a[i] a i 3 * a[i-1] + 1 3 * a[i-1] 3 a[i-1] a i-1 i 1 1 for(int j=1; j<i; j++){
                if(a[i] == a[j]){
                    System.out.println(i);
                    return;
                }
            } int j=1; int j=1; j 1 j<i j i j++ j++ j {
                if(a[i] == a[j]){
                    System.out.println(i);
                    return;
                }
            } {
                if(a[i] == a[j]){
                    System.out.println(i);
                    return;
                }
            } if(a[i] == a[j]){
                    System.out.println(i);
                    return;
                } a[i] == a[j] a[i] a i a[j] a j {
                    System.out.println(i);
                    return;
                } System.out.println(i) System.out.println System.out System System.out i return; String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a[] = new int[1000001];
        a[1] = sc.nextInt();
        for(int i=2; i<1000001; i++){
            if(a[i-1]%2 == 0){
                a[i] = a[i -1] / 2;
            }else{
                a[i] = 3 * a[i-1] + 1;
            }
            for(int j=1; j<i; j++){
                if(a[i] == a[j]){
                    System.out.println(i);
                    return;
                }
            }
        }
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a[] = new int[1000001];
        a[1] = sc.nextInt();
        for(int i=2; i<1000001; i++){
            if(a[i-1]%2 == 0){
                a[i] = a[i -1] / 2;
            }else{
                a[i] = 3 * a[i-1] + 1;
            }
            for(int j=1; j<i; j++){
                if(a[i] == a[j]){
                    System.out.println(i);
                    return;
                }
            }
        }
    }
} Main
import java.util.*;
import static java.lang.Math.*;
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a[] = new int[1000001];
        a[1] = sc.nextInt();
        for(int i=2; i<1000001; i++){
            if(a[i-1]%2 == 0){
                a[i] = a[i -1] / 2;
            }else{
                a[i] = 3 * a[i-1] + 1;
            }
            for(int j=1; j<i; j++){
                if(a[i] == a[j]){
                    System.out.println(i);
                    return;
                }
            }
        }
    }
}
