fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n: usize = n.trim().parse().unwrap(); const DIVISOR: usize = 1_000_000_007; let mut osum: usize = 1; let mut esum: usize = 0; for i in 2..=n { if i % 2 == 0 { let val = osum * i % DIVISOR; esum += val; esum %= DIVISOR; } else { let val = esum * i % DIVISOR; osum += val; osum %= DIVISOR; } } if n == 1 { println!("1"); } else { println!("{}", if n % 2 == 0 { osum * n % DIVISOR } else { esum * n % DIVISOR }); } }