function Main(input) { const N = parseInt(input.trim()) let dp = [] dp[1] = 1 dp[2] = 2 dp[3] = 2 for (let i = 4; i <= N; i++) { dp[i] = (dp[i - 2] + dp[i - 3]) % (10 ** 9 + 7) } console.log(dp[N]) } Main(require("fs").readFileSync("/dev/stdin", "utf8"))