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

public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int s;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        s = sc.nextInt();
    }
    
    //解答処理
    private int solve() {
    	ArrayList<Integer> a = new ArrayList<Integer>();
    	a.add(s);	//初項
    	
    	int m = 0;
        for (int i=1; i<100000; i++) {
        	if (a.get(i-1) % 2 == 0) {
        		s =  s /2;
        	} else {
        		s = 3 * s + 1;
        	}
        	if (a.contains(s)) {
        		m = i + 1;
        		break;
        	} else {
        		a.add(s);
        	}
        }
        
        return m;
    }
    
    //出力
    public void show(int answer) {
        System.out.println(answer);
    }

} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int s;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        s = sc.nextInt();
    }
    
    //解答処理
    private int solve() {
    	ArrayList<Integer> a = new ArrayList<Integer>();
    	a.add(s);	//初項
    	
    	int m = 0;
        for (int i=1; i<100000; i++) {
        	if (a.get(i-1) % 2 == 0) {
        		s =  s /2;
        	} else {
        		s = 3 * s + 1;
        	}
        	if (a.contains(s)) {
        		m = i + 1;
        		break;
        	} else {
        		a.add(s);
        	}
        }
        
        return m;
    }
    
    //出力
    public void show(int answer) {
        System.out.println(answer);
    }

} Main //フィールド
    Scanner sc; sc int s; s public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Main m = new Main(sc); m new Main(sc) m.show(m.solve()) m.show m m.solve() m.solve m sc.close() sc.close sc String[] args args //入力
    Main(Scanner sc) {
        this.sc = sc;
        s = sc.nextInt();
    } Main {
        this.sc = sc;
        s = sc.nextInt();
    } this.sc = sc this.sc this this.sc sc s = sc.nextInt() s sc.nextInt() sc.nextInt sc Scanner sc sc //解答処理
    private int solve() {
    	ArrayList<Integer> a = new ArrayList<Integer>();
    	a.add(s);	//初項
    	
    	int m = 0;
        for (int i=1; i<100000; i++) {
        	if (a.get(i-1) % 2 == 0) {
        		s =  s /2;
        	} else {
        		s = 3 * s + 1;
        	}
        	if (a.contains(s)) {
        		m = i + 1;
        		break;
        	} else {
        		a.add(s);
        	}
        }
        
        return m;
    } solve {
    	ArrayList<Integer> a = new ArrayList<Integer>();
    	a.add(s);	//初項
    	
    	int m = 0;
        for (int i=1; i<100000; i++) {
        	if (a.get(i-1) % 2 == 0) {
        		s =  s /2;
        	} else {
        		s = 3 * s + 1;
        	}
        	if (a.contains(s)) {
        		m = i + 1;
        		break;
        	} else {
        		a.add(s);
        	}
        }
        
        return m;
    } ArrayList<Integer> a = new ArrayList<Integer>(); a new ArrayList<Integer>() a.add(s) a.add a s int m = 0; m 0 for (int i=1; i<100000; i++) {
        	if (a.get(i-1) % 2 == 0) {
        		s =  s /2;
        	} else {
        		s = 3 * s + 1;
        	}
        	if (a.contains(s)) {
        		m = i + 1;
        		break;
        	} else {
        		a.add(s);
        	}
        } int i=1; int i=1; i 1 i<100000 i 100000 i++ i++ i {
        	if (a.get(i-1) % 2 == 0) {
        		s =  s /2;
        	} else {
        		s = 3 * s + 1;
        	}
        	if (a.contains(s)) {
        		m = i + 1;
        		break;
        	} else {
        		a.add(s);
        	}
        } {
        	if (a.get(i-1) % 2 == 0) {
        		s =  s /2;
        	} else {
        		s = 3 * s + 1;
        	}
        	if (a.contains(s)) {
        		m = i + 1;
        		break;
        	} else {
        		a.add(s);
        	}
        } if (a.get(i-1) % 2 == 0) {
        		s =  s /2;
        	} else {
        		s = 3 * s + 1;
        	} a.get(i-1) % 2 == 0 a.get(i-1) % 2 a.get(i-1) a.get a i-1 i 1 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 if (a.contains(s)) {
        		m = i + 1;
        		break;
        	} else {
        		a.add(s);
        	} a.contains(s) a.contains a s {
        		m = i + 1;
        		break;
        	} m = i + 1 m i + 1 i 1 break; {
        		a.add(s);
        	} a.add(s) a.add a s return m; m //出力
    public void show(int answer) {
        System.out.println(answer);
    } show {
        System.out.println(answer);
    } System.out.println(answer) System.out.println System.out System System.out answer int answer answer public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int s;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        s = sc.nextInt();
    }
    
    //解答処理
    private int solve() {
    	ArrayList<Integer> a = new ArrayList<Integer>();
    	a.add(s);	//初項
    	
    	int m = 0;
        for (int i=1; i<100000; i++) {
        	if (a.get(i-1) % 2 == 0) {
        		s =  s /2;
        	} else {
        		s = 3 * s + 1;
        	}
        	if (a.contains(s)) {
        		m = i + 1;
        		break;
        	} else {
        		a.add(s);
        	}
        }
        
        return m;
    }
    
    //出力
    public void show(int answer) {
        System.out.println(answer);
    }

} public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int s;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        s = sc.nextInt();
    }
    
    //解答処理
    private int solve() {
    	ArrayList<Integer> a = new ArrayList<Integer>();
    	a.add(s);	//初項
    	
    	int m = 0;
        for (int i=1; i<100000; i++) {
        	if (a.get(i-1) % 2 == 0) {
        		s =  s /2;
        	} else {
        		s = 3 * s + 1;
        	}
        	if (a.contains(s)) {
        		m = i + 1;
        		break;
        	} else {
        		a.add(s);
        	}
        }
        
        return m;
    }
    
    //出力
    public void show(int answer) {
        System.out.println(answer);
    }

} Main
import java.util.ArrayList;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        Main m = new Main(sc);
        m.show(m.solve());
        sc.close();
    }
    
	//フィールド
    Scanner sc;
    int s;
    
    //入力
    Main(Scanner sc) {
        this.sc = sc;
        s = sc.nextInt();
    }
    
    //解答処理
    private int solve() {
    	ArrayList<Integer> a = new ArrayList<Integer>();
    	a.add(s);	//初項
    	
    	int m = 0;
        for (int i=1; i<100000; i++) {
        	if (a.get(i-1) % 2 == 0) {
        		s =  s /2;
        	} else {
        		s = 3 * s + 1;
        	}
        	if (a.contains(s)) {
        		m = i + 1;
        		break;
        	} else {
        		a.add(s);
        	}
        }
        
        return m;
    }
    
    //出力
    public void show(int answer) {
        System.out.println(answer);
    }

}
