fn is_power_of_two(n: isize) -> bool { n > 0 && (n & (n - 1)) == 0 } fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n: isize = n.trim().parse().unwrap(); println!("{}", if is_power_of_two(n) { 1 } else if n % 2 == 0 { 3 } else { 2 }); }