import java.util.Scanner;

/**
 * @author yoshizaki
 *
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        int s = scanner.nextInt();
        int[] funcAns = new int[100010];
        boolean twice = false;
        funcAns[0] = s;
        int i = 1;
        while(!twice) {
            funcAns[i] = func(funcAns[i-1]);
            for(int j = i - 1; j >= 0; j--) {
                if(funcAns[i] == funcAns[j]) {
                    twice = true;
                }
            }
            i++;
        }
        System.out.println(i);
    }
    public static int func(int i) {
        if(i % 2 ==0) return i/2;
        return (i * 3) + 1;
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        int s = scanner.nextInt();
        int[] funcAns = new int[100010];
        boolean twice = false;
        funcAns[0] = s;
        int i = 1;
        while(!twice) {
            funcAns[i] = func(funcAns[i-1]);
            for(int j = i - 1; j >= 0; j--) {
                if(funcAns[i] == funcAns[j]) {
                    twice = true;
                }
            }
            i++;
        }
        System.out.println(i);
    }
    public static int func(int i) {
        if(i % 2 ==0) return i/2;
        return (i * 3) + 1;
    }
} Main public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        int s = scanner.nextInt();
        int[] funcAns = new int[100010];
        boolean twice = false;
        funcAns[0] = s;
        int i = 1;
        while(!twice) {
            funcAns[i] = func(funcAns[i-1]);
            for(int j = i - 1; j >= 0; j--) {
                if(funcAns[i] == funcAns[j]) {
                    twice = true;
                }
            }
            i++;
        }
        System.out.println(i);
    } main {
        Scanner scanner= new Scanner(System.in);
        int s = scanner.nextInt();
        int[] funcAns = new int[100010];
        boolean twice = false;
        funcAns[0] = s;
        int i = 1;
        while(!twice) {
            funcAns[i] = func(funcAns[i-1]);
            for(int j = i - 1; j >= 0; j--) {
                if(funcAns[i] == funcAns[j]) {
                    twice = true;
                }
            }
            i++;
        }
        System.out.println(i);
    } Scanner scanner= new Scanner(System.in); scanner new Scanner(System.in) int s = scanner.nextInt(); s scanner.nextInt() scanner.nextInt scanner int[] funcAns = new int[100010]; funcAns new int[100010] 100010 boolean twice = false; twice false funcAns[0] = s funcAns[0] funcAns 0 s int i = 1; i 1 while(!twice) {
            funcAns[i] = func(funcAns[i-1]);
            for(int j = i - 1; j >= 0; j--) {
                if(funcAns[i] == funcAns[j]) {
                    twice = true;
                }
            }
            i++;
        } !twice twice {
            funcAns[i] = func(funcAns[i-1]);
            for(int j = i - 1; j >= 0; j--) {
                if(funcAns[i] == funcAns[j]) {
                    twice = true;
                }
            }
            i++;
        } funcAns[i] = func(funcAns[i-1]) funcAns[i] funcAns i func(funcAns[i-1]) func funcAns[i-1] funcAns i-1 i 1 for(int j = i - 1; j >= 0; j--) {
                if(funcAns[i] == funcAns[j]) {
                    twice = true;
                }
            } int j = i - 1; int j = i - 1; j i - 1 i 1 j >= 0 j 0 j-- j-- j {
                if(funcAns[i] == funcAns[j]) {
                    twice = true;
                }
            } {
                if(funcAns[i] == funcAns[j]) {
                    twice = true;
                }
            } if(funcAns[i] == funcAns[j]) {
                    twice = true;
                } funcAns[i] == funcAns[j] funcAns[i] funcAns i funcAns[j] funcAns j {
                    twice = true;
                } twice = true twice true i++ i System.out.println(i) System.out.println System.out System System.out i String[] args args public static int func(int i) {
        if(i % 2 ==0) return i/2;
        return (i * 3) + 1;
    } func {
        if(i % 2 ==0) return i/2;
        return (i * 3) + 1;
    } if(i % 2 ==0) return i/2; i % 2 ==0 i % 2 i 2 0 return i/2; i/2 i 2 return (i * 3) + 1; (i * 3) + 1 (i * 3) i 3 1 int i i public class Main {
    public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        int s = scanner.nextInt();
        int[] funcAns = new int[100010];
        boolean twice = false;
        funcAns[0] = s;
        int i = 1;
        while(!twice) {
            funcAns[i] = func(funcAns[i-1]);
            for(int j = i - 1; j >= 0; j--) {
                if(funcAns[i] == funcAns[j]) {
                    twice = true;
                }
            }
            i++;
        }
        System.out.println(i);
    }
    public static int func(int i) {
        if(i % 2 ==0) return i/2;
        return (i * 3) + 1;
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        int s = scanner.nextInt();
        int[] funcAns = new int[100010];
        boolean twice = false;
        funcAns[0] = s;
        int i = 1;
        while(!twice) {
            funcAns[i] = func(funcAns[i-1]);
            for(int j = i - 1; j >= 0; j--) {
                if(funcAns[i] == funcAns[j]) {
                    twice = true;
                }
            }
            i++;
        }
        System.out.println(i);
    }
    public static int func(int i) {
        if(i % 2 ==0) return i/2;
        return (i * 3) + 1;
    }
} Main
import java.util.Scanner;

/**
 * @author yoshizaki
 *
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner= new Scanner(System.in);
        int s = scanner.nextInt();
        int[] funcAns = new int[100010];
        boolean twice = false;
        funcAns[0] = s;
        int i = 1;
        while(!twice) {
            funcAns[i] = func(funcAns[i-1]);
            for(int j = i - 1; j >= 0; j--) {
                if(funcAns[i] == funcAns[j]) {
                    twice = true;
                }
            }
            i++;
        }
        System.out.println(i);
    }
    public static int func(int i) {
        if(i % 2 ==0) return i/2;
        return (i * 3) + 1;
    }
}