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 n: u64 = itr.next().unwrap().parse().unwrap(); let mut ans = 1; for _ in 0..128 { ans = (ans << 1) % n; } println!("{}", ans); }