use std::io::*; fn main() { let mut s: String = String::new(); std::io::stdin().read_to_string(&mut s).ok(); let mut itr = s.trim().split_whitespace(); let mut n: usize = itr.next().unwrap().parse().unwrap(); if n == 1 { println!("0"); println!("1"); } else { let mut max = n; let mut one = 0; loop { if n == 1 { println!("{}", one); println!("{}", max); break; } if n % 2 == 0 { n >>= 1; } else { n *= 3; n += 1; } max = std::cmp::max(max, n); one += 1; } } }