import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        Set<Integer> set = new HashSet<>();
        int past = s;
        set.add(past);
        for (int i = 2 ;i<= 1000000 ;i++) {
            int cur;
            if (past % 2 == 0) {
                cur = past / 2;
            } else {
                cur = 3 * past +1;
            }
            if (set.contains(cur)) {
                System.out.println(i);
                return;
            }
            set.add(cur);
            past = cur;
        }
    }
} import java.util.*; util.* java public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        Set<Integer> set = new HashSet<>();
        int past = s;
        set.add(past);
        for (int i = 2 ;i<= 1000000 ;i++) {
            int cur;
            if (past % 2 == 0) {
                cur = past / 2;
            } else {
                cur = 3 * past +1;
            }
            if (set.contains(cur)) {
                System.out.println(i);
                return;
            }
            set.add(cur);
            past = cur;
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        Set<Integer> set = new HashSet<>();
        int past = s;
        set.add(past);
        for (int i = 2 ;i<= 1000000 ;i++) {
            int cur;
            if (past % 2 == 0) {
                cur = past / 2;
            } else {
                cur = 3 * past +1;
            }
            if (set.contains(cur)) {
                System.out.println(i);
                return;
            }
            set.add(cur);
            past = cur;
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        Set<Integer> set = new HashSet<>();
        int past = s;
        set.add(past);
        for (int i = 2 ;i<= 1000000 ;i++) {
            int cur;
            if (past % 2 == 0) {
                cur = past / 2;
            } else {
                cur = 3 * past +1;
            }
            if (set.contains(cur)) {
                System.out.println(i);
                return;
            }
            set.add(cur);
            past = cur;
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc Set<Integer> set = new HashSet<>(); set new HashSet<>() int past = s; past s set.add(past) set.add set past for (int i = 2 ;i<= 1000000 ;i++) {
            int cur;
            if (past % 2 == 0) {
                cur = past / 2;
            } else {
                cur = 3 * past +1;
            }
            if (set.contains(cur)) {
                System.out.println(i);
                return;
            }
            set.add(cur);
            past = cur;
        } int i = 2 ; int i = 2 ; i 2 i<= 1000000 i 1000000 i++ i++ i {
            int cur;
            if (past % 2 == 0) {
                cur = past / 2;
            } else {
                cur = 3 * past +1;
            }
            if (set.contains(cur)) {
                System.out.println(i);
                return;
            }
            set.add(cur);
            past = cur;
        } {
            int cur;
            if (past % 2 == 0) {
                cur = past / 2;
            } else {
                cur = 3 * past +1;
            }
            if (set.contains(cur)) {
                System.out.println(i);
                return;
            }
            set.add(cur);
            past = cur;
        } int cur; cur if (past % 2 == 0) {
                cur = past / 2;
            } else {
                cur = 3 * past +1;
            } past % 2 == 0 past % 2 past 2 0 {
                cur = past / 2;
            } cur = past / 2 cur past / 2 past 2 {
                cur = 3 * past +1;
            } cur = 3 * past +1 cur 3 * past +1 3 * past 3 past 1 if (set.contains(cur)) {
                System.out.println(i);
                return;
            } set.contains(cur) set.contains set cur {
                System.out.println(i);
                return;
            } System.out.println(i) System.out.println System.out System System.out i return; set.add(cur) set.add set cur past = cur past cur String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        Set<Integer> set = new HashSet<>();
        int past = s;
        set.add(past);
        for (int i = 2 ;i<= 1000000 ;i++) {
            int cur;
            if (past % 2 == 0) {
                cur = past / 2;
            } else {
                cur = 3 * past +1;
            }
            if (set.contains(cur)) {
                System.out.println(i);
                return;
            }
            set.add(cur);
            past = cur;
        }
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        Set<Integer> set = new HashSet<>();
        int past = s;
        set.add(past);
        for (int i = 2 ;i<= 1000000 ;i++) {
            int cur;
            if (past % 2 == 0) {
                cur = past / 2;
            } else {
                cur = 3 * past +1;
            }
            if (set.contains(cur)) {
                System.out.println(i);
                return;
            }
            set.add(cur);
            past = cur;
        }
    }
} Main
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int s = sc.nextInt();
        Set<Integer> set = new HashSet<>();
        int past = s;
        set.add(past);
        for (int i = 2 ;i<= 1000000 ;i++) {
            int cur;
            if (past % 2 == 0) {
                cur = past / 2;
            } else {
                cur = 3 * past +1;
            }
            if (set.contains(cur)) {
                System.out.println(i);
                return;
            }
            set.add(cur);
            past = cur;
        }
    }
}
