#include #include #include #include #include #include #include #include using ll = long long; using namespace std; ll MOD = 1e9 + 7; ll dp[1000010]; int main(void) { int N; cin >> N; dp[1] = 1; dp[2] = 2; dp[3] = 2; dp[4] = 3; for (int i = 5; i <= N; ++i) { dp[i] = (dp[i - 2] + dp[i - 3]) % MOD; } cout << dp[N] << endl; return 0; }