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 dp: Vec = vec![0; n+1]; dp[1] = 1; for i in 2..=n { //1回1回押す -> (2 * (i-1) + 1) C 2 //2連打 -> (2 * (i-1) + 1) dp[i] = (2 * (i-1) + 1) * dp[i-1]; dp[i] %= DIVISOR; let mut temp: usize = (2 * (i-1) + 1) * 2 * (i-1) / 2; temp %= DIVISOR; temp *= dp[i-1]; temp %= DIVISOR; dp[i] += temp; dp[i] %= DIVISOR; } println!("{}", dp[n]); }