
import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int S = sc.nextInt();
        ArrayList<Integer> done = new ArrayList<>();
        int counter = 1;
        done.add(S);
        while (true) {
            counter++;
            if (S%2==1) {
                S = 3*S + 1;
                if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                }
                done.add(S);
            } else {
                S = S/2;
                if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                }
                done.add(S);
            }
        }
    }
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int S = sc.nextInt();
        ArrayList<Integer> done = new ArrayList<>();
        int counter = 1;
        done.add(S);
        while (true) {
            counter++;
            if (S%2==1) {
                S = 3*S + 1;
                if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                }
                done.add(S);
            } else {
                S = S/2;
                if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                }
                done.add(S);
            }
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int S = sc.nextInt();
        ArrayList<Integer> done = new ArrayList<>();
        int counter = 1;
        done.add(S);
        while (true) {
            counter++;
            if (S%2==1) {
                S = 3*S + 1;
                if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                }
                done.add(S);
            } else {
                S = S/2;
                if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                }
                done.add(S);
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int S = sc.nextInt();
        ArrayList<Integer> done = new ArrayList<>();
        int counter = 1;
        done.add(S);
        while (true) {
            counter++;
            if (S%2==1) {
                S = 3*S + 1;
                if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                }
                done.add(S);
            } else {
                S = S/2;
                if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                }
                done.add(S);
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int S = sc.nextInt(); S sc.nextInt() sc.nextInt sc ArrayList<Integer> done = new ArrayList<>(); done new ArrayList<>() int counter = 1; counter 1 done.add(S) done.add done S while (true) {
            counter++;
            if (S%2==1) {
                S = 3*S + 1;
                if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                }
                done.add(S);
            } else {
                S = S/2;
                if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                }
                done.add(S);
            }
        } true {
            counter++;
            if (S%2==1) {
                S = 3*S + 1;
                if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                }
                done.add(S);
            } else {
                S = S/2;
                if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                }
                done.add(S);
            }
        } counter++ counter if (S%2==1) {
                S = 3*S + 1;
                if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                }
                done.add(S);
            } else {
                S = S/2;
                if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                }
                done.add(S);
            } S%2==1 S%2 S 2 1 {
                S = 3*S + 1;
                if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                }
                done.add(S);
            } S = 3*S + 1 S 3*S + 1 3*S 3 S 1 if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                } done.contains(S) done.contains done S {
                    System.out.println(counter);
                    break;
                } System.out.println(counter) System.out.println System.out System System.out counter break; done.add(S) done.add done S {
                S = S/2;
                if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                }
                done.add(S);
            } S = S/2 S S/2 S 2 if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                } done.contains(S) done.contains done S {
                    System.out.println(counter);
                    break;
                } System.out.println(counter) System.out.println System.out System System.out counter break; done.add(S) done.add done S String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int S = sc.nextInt();
        ArrayList<Integer> done = new ArrayList<>();
        int counter = 1;
        done.add(S);
        while (true) {
            counter++;
            if (S%2==1) {
                S = 3*S + 1;
                if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                }
                done.add(S);
            } else {
                S = S/2;
                if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                }
                done.add(S);
            }
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int S = sc.nextInt();
        ArrayList<Integer> done = new ArrayList<>();
        int counter = 1;
        done.add(S);
        while (true) {
            counter++;
            if (S%2==1) {
                S = 3*S + 1;
                if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                }
                done.add(S);
            } else {
                S = S/2;
                if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                }
                done.add(S);
            }
        }
    }
} Main

import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int S = sc.nextInt();
        ArrayList<Integer> done = new ArrayList<>();
        int counter = 1;
        done.add(S);
        while (true) {
            counter++;
            if (S%2==1) {
                S = 3*S + 1;
                if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                }
                done.add(S);
            } else {
                S = S/2;
                if (done.contains(S)) {
                    System.out.println(counter);
                    break;
                }
                done.add(S);
            }
        }
    }
}
