import java.util.*; public class Main { public static void myout(Object text){//standard output System.out.println(text); } public static void main(String[] args){ Scanner sc = new Scanner(System.in); //String tmp = sc.next(); //int tmp = sc.nextInt(); //Long tmp = sc.nextLong(); Long n = sc.nextLong(); Long m = n; int i = 0; while(n != 1){ if(n % 2 == 0){ n = n / 2; }else{ n = 3 * n + 1; } i++; m = Math.max(m,n); } myout(i + "\n" + m); } }