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

public class Main {
	public static int f(int a) {
		if(a%2 == 0) {
			return a/2;
		}else {
			return 3*a+1;
		}
		
	}
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		int index;
		sc.close();
		ArrayList<Integer> data  =new ArrayList<Integer>();
		while(true) {
			index = data.indexOf(s);
			data.add(s);
			if(index == -1) {
				s = f(s);
			}else {
				break;
			}
		}
		System.out.println(data.size());
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {
	public static int f(int a) {
		if(a%2 == 0) {
			return a/2;
		}else {
			return 3*a+1;
		}
		
	}
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		int index;
		sc.close();
		ArrayList<Integer> data  =new ArrayList<Integer>();
		while(true) {
			index = data.indexOf(s);
			data.add(s);
			if(index == -1) {
				s = f(s);
			}else {
				break;
			}
		}
		System.out.println(data.size());
	}
} Main public static int f(int a) {
		if(a%2 == 0) {
			return a/2;
		}else {
			return 3*a+1;
		}
		
	} f {
		if(a%2 == 0) {
			return a/2;
		}else {
			return 3*a+1;
		}
		
	} if(a%2 == 0) {
			return a/2;
		}else {
			return 3*a+1;
		} a%2 == 0 a%2 a 2 0 {
			return a/2;
		} return a/2; a/2 a 2 {
			return 3*a+1;
		} return 3*a+1; 3*a+1 3*a 3 a 1 int a a public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		int index;
		sc.close();
		ArrayList<Integer> data  =new ArrayList<Integer>();
		while(true) {
			index = data.indexOf(s);
			data.add(s);
			if(index == -1) {
				s = f(s);
			}else {
				break;
			}
		}
		System.out.println(data.size());
	} main {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		int index;
		sc.close();
		ArrayList<Integer> data  =new ArrayList<Integer>();
		while(true) {
			index = data.indexOf(s);
			data.add(s);
			if(index == -1) {
				s = f(s);
			}else {
				break;
			}
		}
		System.out.println(data.size());
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int s = sc.nextInt(); s sc.nextInt() sc.nextInt sc int index; index sc.close() sc.close sc ArrayList<Integer> data  =new ArrayList<Integer>(); data new ArrayList<Integer>() while(true) {
			index = data.indexOf(s);
			data.add(s);
			if(index == -1) {
				s = f(s);
			}else {
				break;
			}
		} true {
			index = data.indexOf(s);
			data.add(s);
			if(index == -1) {
				s = f(s);
			}else {
				break;
			}
		} index = data.indexOf(s) index data.indexOf(s) data.indexOf data s data.add(s) data.add data s if(index == -1) {
				s = f(s);
			}else {
				break;
			} index == -1 index -1 1 {
				s = f(s);
			} s = f(s) s f(s) f s {
				break;
			} break; System.out.println(data.size()) System.out.println System.out System System.out data.size() data.size data String[] args args public class Main {
	public static int f(int a) {
		if(a%2 == 0) {
			return a/2;
		}else {
			return 3*a+1;
		}
		
	}
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		int index;
		sc.close();
		ArrayList<Integer> data  =new ArrayList<Integer>();
		while(true) {
			index = data.indexOf(s);
			data.add(s);
			if(index == -1) {
				s = f(s);
			}else {
				break;
			}
		}
		System.out.println(data.size());
	}
} public class Main {
	public static int f(int a) {
		if(a%2 == 0) {
			return a/2;
		}else {
			return 3*a+1;
		}
		
	}
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		int index;
		sc.close();
		ArrayList<Integer> data  =new ArrayList<Integer>();
		while(true) {
			index = data.indexOf(s);
			data.add(s);
			if(index == -1) {
				s = f(s);
			}else {
				break;
			}
		}
		System.out.println(data.size());
	}
} Main

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

public class Main {
	public static int f(int a) {
		if(a%2 == 0) {
			return a/2;
		}else {
			return 3*a+1;
		}
		
	}
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int s = sc.nextInt();
		int index;
		sc.close();
		ArrayList<Integer> data  =new ArrayList<Integer>();
		while(true) {
			index = data.indexOf(s);
			data.add(s);
			if(index == -1) {
				s = f(s);
			}else {
				break;
			}
		}
		System.out.println(data.size());
	}
}
