fun main() { val n = readLine()!!.toInt() val dp = Array(3) { Array(n+1) { 0L } } dp[0][0] = 1 val MOD = 1_000_000_007 for (i in 1 .. n) { dp[0][i] = (dp[1][i-1] + dp[2][i-1]) % MOD dp[1][i] = dp[0][i-1] dp[2][i] = dp[1][i-1] } val ans = dp.sumOf { it.last() } % MOD println(ans) }