fn run() { let mut s = String::new(); std::io::stdin().read_line(&mut s).unwrap(); let mut n: u32 = s.trim().parse().unwrap(); let mut i = 0; let mut max = n; while n > 1 { n = if n % 2 == 0 {n / 2} else {3 * n + 1}; i += 1; max = std::cmp::max(max, n); } println!("{}\n{}", i, max); } fn main() { run(); }