#include using namespace std; #define MOD 1000000007 long long int dp[3][1000005]; int main() { int n; cin >> n; dp[0][0] = 1; dp[1][0] = 0; dp[2][0] = 0; dp[0][1] = 0; dp[1][1] = 1; dp[2][1] = 1; for (int i = 1; i < n; i++) { dp[0][i] = dp[2][i - 1]; dp[1][i] = dp[0][i - 1]; dp[2][i] = (dp[0][i - 1] + dp[1][i - 1])%MOD; } int ans=dp[0][n - 1] + dp[1][n - 1] % MOD + dp[2][n - 1] % MOD; ans %= MOD; cout << ans << endl; return 0; }