
import java.io.BufferedReader;
import java.io.InputStreamReader;


public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve(args);
    }

    public void solve(String[] args) {
        MyScanner scanner = new MyScanner();
        int s = scanner.nextInt();
        int roop = 1000000;
        Integer[] li = new Integer[roop];
        li[0] = 0;

        for(int i=1;i<roop;i++) {
        	if(i == 1) {
        		li[i] = s;
        	}else {
        		int n = li[i-1];
        		if(n % 2 == 0) {
        			li[i] = n/2;
        		}else {
        			li[i] = 3*n+1;
        		}
        	}
        }

        int rs = 0;
        for(int i=1;i<roop-1;i++) {
        	for(int k=i+1;k<roop;k++) {
        		if(li[i] ==li[k]) {
        			rs = k;
        			System.out.println(rs);
        			break;
            	}
        	}
    		if(rs > 0) {
    			break;
    		}
        }
    }

    private class MyScanner {
        String[] s;
        int i;
        BufferedReader br;
        String reg = " ";
        MyScanner () {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        public String next() {
            try {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } catch (Exception e) {e.printStackTrace();}
            return null;
        }
        public int nextInt() {
            try {return Integer.parseInt(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public double nextDouble() {
            try {return Double.parseDouble(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public long nextLong()  {
            try {return Long.parseLong(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
    }
}

 import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve(args);
    }

    public void solve(String[] args) {
        MyScanner scanner = new MyScanner();
        int s = scanner.nextInt();
        int roop = 1000000;
        Integer[] li = new Integer[roop];
        li[0] = 0;

        for(int i=1;i<roop;i++) {
        	if(i == 1) {
        		li[i] = s;
        	}else {
        		int n = li[i-1];
        		if(n % 2 == 0) {
        			li[i] = n/2;
        		}else {
        			li[i] = 3*n+1;
        		}
        	}
        }

        int rs = 0;
        for(int i=1;i<roop-1;i++) {
        	for(int k=i+1;k<roop;k++) {
        		if(li[i] ==li[k]) {
        			rs = k;
        			System.out.println(rs);
        			break;
            	}
        	}
    		if(rs > 0) {
    			break;
    		}
        }
    }

    private class MyScanner {
        String[] s;
        int i;
        BufferedReader br;
        String reg = " ";
        MyScanner () {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        public String next() {
            try {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } catch (Exception e) {e.printStackTrace();}
            return null;
        }
        public int nextInt() {
            try {return Integer.parseInt(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public double nextDouble() {
            try {return Double.parseDouble(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public long nextLong()  {
            try {return Long.parseLong(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
    }
} Main public static void main(String[] args) {
        Main main = new Main();
        main.solve(args);
    } main {
        Main main = new Main();
        main.solve(args);
    } Main main = new Main(); main new Main() main.solve(args) main.solve main args String[] args args public void solve(String[] args) {
        MyScanner scanner = new MyScanner();
        int s = scanner.nextInt();
        int roop = 1000000;
        Integer[] li = new Integer[roop];
        li[0] = 0;

        for(int i=1;i<roop;i++) {
        	if(i == 1) {
        		li[i] = s;
        	}else {
        		int n = li[i-1];
        		if(n % 2 == 0) {
        			li[i] = n/2;
        		}else {
        			li[i] = 3*n+1;
        		}
        	}
        }

        int rs = 0;
        for(int i=1;i<roop-1;i++) {
        	for(int k=i+1;k<roop;k++) {
        		if(li[i] ==li[k]) {
        			rs = k;
        			System.out.println(rs);
        			break;
            	}
        	}
    		if(rs > 0) {
    			break;
    		}
        }
    } solve {
        MyScanner scanner = new MyScanner();
        int s = scanner.nextInt();
        int roop = 1000000;
        Integer[] li = new Integer[roop];
        li[0] = 0;

        for(int i=1;i<roop;i++) {
        	if(i == 1) {
        		li[i] = s;
        	}else {
        		int n = li[i-1];
        		if(n % 2 == 0) {
        			li[i] = n/2;
        		}else {
        			li[i] = 3*n+1;
        		}
        	}
        }

        int rs = 0;
        for(int i=1;i<roop-1;i++) {
        	for(int k=i+1;k<roop;k++) {
        		if(li[i] ==li[k]) {
        			rs = k;
        			System.out.println(rs);
        			break;
            	}
        	}
    		if(rs > 0) {
    			break;
    		}
        }
    } MyScanner scanner = new MyScanner(); scanner new MyScanner() int s = scanner.nextInt(); s scanner.nextInt() scanner.nextInt scanner int roop = 1000000; roop 1000000 Integer[] li = new Integer[roop]; li new Integer[roop] roop li[0] = 0 li[0] li 0 0 for(int i=1;i<roop;i++) {
        	if(i == 1) {
        		li[i] = s;
        	}else {
        		int n = li[i-1];
        		if(n % 2 == 0) {
        			li[i] = n/2;
        		}else {
        			li[i] = 3*n+1;
        		}
        	}
        } int i=1; int i=1; i 1 i<roop i roop i++ i++ i {
        	if(i == 1) {
        		li[i] = s;
        	}else {
        		int n = li[i-1];
        		if(n % 2 == 0) {
        			li[i] = n/2;
        		}else {
        			li[i] = 3*n+1;
        		}
        	}
        } {
        	if(i == 1) {
        		li[i] = s;
        	}else {
        		int n = li[i-1];
        		if(n % 2 == 0) {
        			li[i] = n/2;
        		}else {
        			li[i] = 3*n+1;
        		}
        	}
        } if(i == 1) {
        		li[i] = s;
        	}else {
        		int n = li[i-1];
        		if(n % 2 == 0) {
        			li[i] = n/2;
        		}else {
        			li[i] = 3*n+1;
        		}
        	} i == 1 i 1 {
        		li[i] = s;
        	} li[i] = s li[i] li i s {
        		int n = li[i-1];
        		if(n % 2 == 0) {
        			li[i] = n/2;
        		}else {
        			li[i] = 3*n+1;
        		}
        	} int n = li[i-1]; n li[i-1] li i-1 i 1 if(n % 2 == 0) {
        			li[i] = n/2;
        		}else {
        			li[i] = 3*n+1;
        		} n % 2 == 0 n % 2 n 2 0 {
        			li[i] = n/2;
        		} li[i] = n/2 li[i] li i n/2 n 2 {
        			li[i] = 3*n+1;
        		} li[i] = 3*n+1 li[i] li i 3*n+1 3*n 3 n 1 int rs = 0; rs 0 for(int i=1;i<roop-1;i++) {
        	for(int k=i+1;k<roop;k++) {
        		if(li[i] ==li[k]) {
        			rs = k;
        			System.out.println(rs);
        			break;
            	}
        	}
    		if(rs > 0) {
    			break;
    		}
        } int i=1; int i=1; i 1 i<roop-1 i roop-1 roop 1 i++ i++ i {
        	for(int k=i+1;k<roop;k++) {
        		if(li[i] ==li[k]) {
        			rs = k;
        			System.out.println(rs);
        			break;
            	}
        	}
    		if(rs > 0) {
    			break;
    		}
        } {
        	for(int k=i+1;k<roop;k++) {
        		if(li[i] ==li[k]) {
        			rs = k;
        			System.out.println(rs);
        			break;
            	}
        	}
    		if(rs > 0) {
    			break;
    		}
        } for(int k=i+1;k<roop;k++) {
        		if(li[i] ==li[k]) {
        			rs = k;
        			System.out.println(rs);
        			break;
            	}
        	} int k=i+1; int k=i+1; k i+1 i 1 k<roop k roop k++ k++ k {
        		if(li[i] ==li[k]) {
        			rs = k;
        			System.out.println(rs);
        			break;
            	}
        	} {
        		if(li[i] ==li[k]) {
        			rs = k;
        			System.out.println(rs);
        			break;
            	}
        	} if(li[i] ==li[k]) {
        			rs = k;
        			System.out.println(rs);
        			break;
            	} li[i] ==li[k] li[i] li i li[k] li k {
        			rs = k;
        			System.out.println(rs);
        			break;
            	} rs = k rs k System.out.println(rs) System.out.println System.out System System.out rs break; if(rs > 0) {
    			break;
    		} rs > 0 rs 0 {
    			break;
    		} break; String[] args args private class MyScanner {
        String[] s;
        int i;
        BufferedReader br;
        String reg = " ";
        MyScanner () {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        public String next() {
            try {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } catch (Exception e) {e.printStackTrace();}
            return null;
        }
        public int nextInt() {
            try {return Integer.parseInt(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public double nextDouble() {
            try {return Double.parseDouble(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public long nextLong()  {
            try {return Long.parseLong(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
    } MyScanner String[] s; s int i; i BufferedReader br; br String reg = " "; reg " " MyScanner () {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        } MyScanner {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        } s = new String[0] s new String[0] 0 i = 0 i 0 br = new BufferedReader(new InputStreamReader(System.in)) br new BufferedReader(new InputStreamReader(System.in)) public String next() {
            try {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } catch (Exception e) {e.printStackTrace();}
            return null;
        } next {
            try {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } catch (Exception e) {e.printStackTrace();}
            return null;
        } try {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } catch (Exception e) {e.printStackTrace();} catch (Exception e) {e.printStackTrace();} Exception e {e.printStackTrace();} e.printStackTrace() e.printStackTrace e {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } if (i < s.length) return s[i++]; i < s.length i s.length s s.length return s[i++]; s[i++] s i++ i String line = br.readLine(); line br.readLine() br.readLine br while (line.equals("")) {line = br.readLine();} line.equals("") line.equals line "" {line = br.readLine();} line = br.readLine() line br.readLine() br.readLine br s = line.split(reg, 0) s line.split(reg, 0) line.split line reg 0 i = 0 i 0 return s[i++]; s[i++] s i++ i return null; null public int nextInt() {
            try {return Integer.parseInt(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        } nextInt {
            try {return Integer.parseInt(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        } try {return Integer.parseInt(next());} catch (Exception e) {e.printStackTrace();} catch (Exception e) {e.printStackTrace();} Exception e {e.printStackTrace();} e.printStackTrace() e.printStackTrace e {return Integer.parseInt(next());} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next return -1; -1 1 public double nextDouble() {
            try {return Double.parseDouble(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        } nextDouble {
            try {return Double.parseDouble(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        } try {return Double.parseDouble(next());} catch (Exception e) {e.printStackTrace();} catch (Exception e) {e.printStackTrace();} Exception e {e.printStackTrace();} e.printStackTrace() e.printStackTrace e {return Double.parseDouble(next());} return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next return -1; -1 1 public long nextLong()  {
            try {return Long.parseLong(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        } nextLong {
            try {return Long.parseLong(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        } try {return Long.parseLong(next());} catch (Exception e) {e.printStackTrace();} catch (Exception e) {e.printStackTrace();} Exception e {e.printStackTrace();} e.printStackTrace() e.printStackTrace e {return Long.parseLong(next());} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next return -1; -1 1 public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve(args);
    }

    public void solve(String[] args) {
        MyScanner scanner = new MyScanner();
        int s = scanner.nextInt();
        int roop = 1000000;
        Integer[] li = new Integer[roop];
        li[0] = 0;

        for(int i=1;i<roop;i++) {
        	if(i == 1) {
        		li[i] = s;
        	}else {
        		int n = li[i-1];
        		if(n % 2 == 0) {
        			li[i] = n/2;
        		}else {
        			li[i] = 3*n+1;
        		}
        	}
        }

        int rs = 0;
        for(int i=1;i<roop-1;i++) {
        	for(int k=i+1;k<roop;k++) {
        		if(li[i] ==li[k]) {
        			rs = k;
        			System.out.println(rs);
        			break;
            	}
        	}
    		if(rs > 0) {
    			break;
    		}
        }
    }

    private class MyScanner {
        String[] s;
        int i;
        BufferedReader br;
        String reg = " ";
        MyScanner () {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        public String next() {
            try {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } catch (Exception e) {e.printStackTrace();}
            return null;
        }
        public int nextInt() {
            try {return Integer.parseInt(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public double nextDouble() {
            try {return Double.parseDouble(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public long nextLong()  {
            try {return Long.parseLong(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
    }
} public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve(args);
    }

    public void solve(String[] args) {
        MyScanner scanner = new MyScanner();
        int s = scanner.nextInt();
        int roop = 1000000;
        Integer[] li = new Integer[roop];
        li[0] = 0;

        for(int i=1;i<roop;i++) {
        	if(i == 1) {
        		li[i] = s;
        	}else {
        		int n = li[i-1];
        		if(n % 2 == 0) {
        			li[i] = n/2;
        		}else {
        			li[i] = 3*n+1;
        		}
        	}
        }

        int rs = 0;
        for(int i=1;i<roop-1;i++) {
        	for(int k=i+1;k<roop;k++) {
        		if(li[i] ==li[k]) {
        			rs = k;
        			System.out.println(rs);
        			break;
            	}
        	}
    		if(rs > 0) {
    			break;
    		}
        }
    }

    private class MyScanner {
        String[] s;
        int i;
        BufferedReader br;
        String reg = " ";
        MyScanner () {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        public String next() {
            try {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } catch (Exception e) {e.printStackTrace();}
            return null;
        }
        public int nextInt() {
            try {return Integer.parseInt(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public double nextDouble() {
            try {return Double.parseDouble(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public long nextLong()  {
            try {return Long.parseLong(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
    }
} Main

import java.io.BufferedReader;
import java.io.InputStreamReader;


public class Main {
    public static void main(String[] args) {
        Main main = new Main();
        main.solve(args);
    }

    public void solve(String[] args) {
        MyScanner scanner = new MyScanner();
        int s = scanner.nextInt();
        int roop = 1000000;
        Integer[] li = new Integer[roop];
        li[0] = 0;

        for(int i=1;i<roop;i++) {
        	if(i == 1) {
        		li[i] = s;
        	}else {
        		int n = li[i-1];
        		if(n % 2 == 0) {
        			li[i] = n/2;
        		}else {
        			li[i] = 3*n+1;
        		}
        	}
        }

        int rs = 0;
        for(int i=1;i<roop-1;i++) {
        	for(int k=i+1;k<roop;k++) {
        		if(li[i] ==li[k]) {
        			rs = k;
        			System.out.println(rs);
        			break;
            	}
        	}
    		if(rs > 0) {
    			break;
    		}
        }
    }

    private class MyScanner {
        String[] s;
        int i;
        BufferedReader br;
        String reg = " ";
        MyScanner () {
            s = new String[0];
            i = 0;
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        public String next() {
            try {
                if (i < s.length) return s[i++];
                String line = br.readLine();
                while (line.equals("")) {line = br.readLine();}
                s = line.split(reg, 0);
                i = 0;return s[i++];
            } catch (Exception e) {e.printStackTrace();}
            return null;
        }
        public int nextInt() {
            try {return Integer.parseInt(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public double nextDouble() {
            try {return Double.parseDouble(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
        public long nextLong()  {
            try {return Long.parseLong(next());} catch (Exception e) {e.printStackTrace();}
            return -1;
        }
    }
}


