import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        DecimalFormat df = new DecimalFormat("0.00000000");

        int s = Integer.parseInt(sc.next());
        int ans = 1;
        while (true) {
            if (s == 4 || s == 2 || s == 1) {
                ans += 3;
                break;
            }
            ans++;
            if (s % 2 == 0) {
                s = s / 2;
            } else {
                s = 3 * s + 1;
            }
        }
        out.println(ans);
        
        out.flush();
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        DecimalFormat df = new DecimalFormat("0.00000000");

        int s = Integer.parseInt(sc.next());
        int ans = 1;
        while (true) {
            if (s == 4 || s == 2 || s == 1) {
                ans += 3;
                break;
            }
            ans++;
            if (s % 2 == 0) {
                s = s / 2;
            } else {
                s = 3 * s + 1;
            }
        }
        out.println(ans);
        
        out.flush();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        DecimalFormat df = new DecimalFormat("0.00000000");

        int s = Integer.parseInt(sc.next());
        int ans = 1;
        while (true) {
            if (s == 4 || s == 2 || s == 1) {
                ans += 3;
                break;
            }
            ans++;
            if (s % 2 == 0) {
                s = s / 2;
            } else {
                s = 3 * s + 1;
            }
        }
        out.println(ans);
        
        out.flush();
    } main {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        DecimalFormat df = new DecimalFormat("0.00000000");

        int s = Integer.parseInt(sc.next());
        int ans = 1;
        while (true) {
            if (s == 4 || s == 2 || s == 1) {
                ans += 3;
                break;
            }
            ans++;
            if (s % 2 == 0) {
                s = s / 2;
            } else {
                s = 3 * s + 1;
            }
        }
        out.println(ans);
        
        out.flush();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) int s = Integer.parseInt(sc.next()); s Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int ans = 1; ans 1 while (true) {
            if (s == 4 || s == 2 || s == 1) {
                ans += 3;
                break;
            }
            ans++;
            if (s % 2 == 0) {
                s = s / 2;
            } else {
                s = 3 * s + 1;
            }
        } true {
            if (s == 4 || s == 2 || s == 1) {
                ans += 3;
                break;
            }
            ans++;
            if (s % 2 == 0) {
                s = s / 2;
            } else {
                s = 3 * s + 1;
            }
        } if (s == 4 || s == 2 || s == 1) {
                ans += 3;
                break;
            } s == 4 || s == 2 || s == 1 s == 4 || s == 2 || s == 1 s == 4 s 4 s == 2 s 2 s == 1 s 1 {
                ans += 3;
                break;
            } ans += 3 ans 3 break; ans++ ans if (s % 2 == 0) {
                s = s / 2;
            } else {
                s = 3 * s + 1;
            } s % 2 == 0 s % 2 s 2 0 {
                s = s / 2;
            } s = s / 2 s s / 2 s 2 {
                s = 3 * s + 1;
            } s = 3 * s + 1 s 3 * s + 1 3 * s 3 s 1 out.println(ans) out.println out ans out.flush() out.flush out String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        DecimalFormat df = new DecimalFormat("0.00000000");

        int s = Integer.parseInt(sc.next());
        int ans = 1;
        while (true) {
            if (s == 4 || s == 2 || s == 1) {
                ans += 3;
                break;
            }
            ans++;
            if (s % 2 == 0) {
                s = s / 2;
            } else {
                s = 3 * s + 1;
            }
        }
        out.println(ans);
        
        out.flush();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        DecimalFormat df = new DecimalFormat("0.00000000");

        int s = Integer.parseInt(sc.next());
        int ans = 1;
        while (true) {
            if (s == 4 || s == 2 || s == 1) {
                ans += 3;
                break;
            }
            ans++;
            if (s % 2 == 0) {
                s = s / 2;
            } else {
                s = 3 * s + 1;
            }
        }
        out.println(ans);
        
        out.flush();
    }
} Main
import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
//        DecimalFormat df = new DecimalFormat("0.00000000");

        int s = Integer.parseInt(sc.next());
        int ans = 1;
        while (true) {
            if (s == 4 || s == 2 || s == 1) {
                ans += 3;
                break;
            }
            ans++;
            if (s % 2 == 0) {
                s = s / 2;
            } else {
                s = 3 * s + 1;
            }
        }
        out.println(ans);
        
        out.flush();
    }
}