fn read() -> T { let mut s = String::new(); std::io::stdin().read_line(&mut s).ok(); s.trim().parse().ok().unwrap() } fn main() { let n: usize = read(); let big_int = 1000_000_000 + 7; let mut dp_ken1 = vec![0usize; n]; let mut dp_ken2 = vec![0usize; n]; let mut dp_pa = vec![0usize; n]; dp_ken1[0] = 1; for i in 0..n - 1 { dp_ken1[i + 1] = dp_pa[i]; dp_ken2[i + 1] = dp_ken1[i]; dp_pa[i + 1] = (dp_ken1[i] + dp_ken2[i]) % big_int; } println!("{:?}", (dp_ken1[n - 1] + dp_ken2[n - 1] + dp_pa[n - 1]) % big_int); }