// test // https://yukicoder.me/submissions/246985 #include #include #include #include #include #include #include #include #include using namespace std; int main() { long N; cin >> N; vector dp; constexpr unsigned long long m = 1e9 + 7; dp.push_back(0); dp.push_back(1); dp.push_back(2); dp.push_back(2); for (long i = 4; i <= N; ++i) { dp.push_back((dp[i - 2] + dp[i - 3]) % m); } cout << dp[N] << "\n"; return 0; }