const MOD: usize = 1e9 as usize + 7; fn main() { let mut n = String::new(); std::io::stdin().read_line(&mut n).ok(); let n: usize = n.trim().parse().unwrap(); let mut dp = vec![0usize; n+1]; dp[1] = 1; for i in 1..n { dp[i+1] += (2 * i + 1) * dp[i] % MOD; dp[i+1] += (2 * i + 1) * (2 * i) / 2 % MOD * dp[i] % MOD; dp[i+1] %= MOD; } println!("{}", dp[n]); }