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; let mut koeta = false; if n < 50 { for i in 1..n + 1 { ans *= i; if ans >= 1000000000000 { koeta = true; ans %= 1000000000000; } } } else { ans = 0; } if koeta || ans == 0 { println!("{:<012}", ans); } else { println!("{}", ans); } }