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