#include #include #include #include #include using namespace std; static const int MAX_N = 1000005; int main() { int n, dp[MAX_N]; cin >> n; dp[1] = 1; dp[2] = 2; dp[3] = 2; for (int i = 4; i <= n; i++) { dp[i] = dp[i - 2] + dp[i - 3]; dp[i] %= 1000000007; } cout << dp[n] << endl; return 0; }