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

public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int s = scan.nextInt();
		List<Integer> list = new ArrayList<>();
		
		while(!list.contains(s)) {
			list.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		}
		
		System.out.println(list.size() + 1);
		
		scan.close();
	}
} import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int s = scan.nextInt();
		List<Integer> list = new ArrayList<>();
		
		while(!list.contains(s)) {
			list.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		}
		
		System.out.println(list.size() + 1);
		
		scan.close();
	}
} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int s = scan.nextInt();
		List<Integer> list = new ArrayList<>();
		
		while(!list.contains(s)) {
			list.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		}
		
		System.out.println(list.size() + 1);
		
		scan.close();
	} main {

		Scanner scan = new Scanner(System.in);
		int s = scan.nextInt();
		List<Integer> list = new ArrayList<>();
		
		while(!list.contains(s)) {
			list.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		}
		
		System.out.println(list.size() + 1);
		
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int s = scan.nextInt(); s scan.nextInt() scan.nextInt scan List<Integer> list = new ArrayList<>(); list new ArrayList<>() while(!list.contains(s)) {
			list.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		} !list.contains(s) list.contains(s) list.contains list s {
			list.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		} list.add(s) list.add list s if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			} s % 2 == 0 s % 2 s 2 0 {
				s /= 2;
			} s /= 2 s 2 {
				s = 3 * s + 1;
			} s = 3 * s + 1 s 3 * s + 1 3 * s 3 s 1 System.out.println(list.size() + 1) System.out.println System.out System System.out list.size() + 1 list.size() list.size list 1 scan.close() scan.close scan String[] args args public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int s = scan.nextInt();
		List<Integer> list = new ArrayList<>();
		
		while(!list.contains(s)) {
			list.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		}
		
		System.out.println(list.size() + 1);
		
		scan.close();
	}
} public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int s = scan.nextInt();
		List<Integer> list = new ArrayList<>();
		
		while(!list.contains(s)) {
			list.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		}
		
		System.out.println(list.size() + 1);
		
		scan.close();
	}
} Main

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

public class Main {
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		int s = scan.nextInt();
		List<Integer> list = new ArrayList<>();
		
		while(!list.contains(s)) {
			list.add(s);
			if (s % 2 == 0) {
				s /= 2;
			} else {
				s = 3 * s + 1;
			}
		}
		
		System.out.println(list.size() + 1);
		
		scan.close();
	}
}