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