#include #include using namespace std; const int mod = 1e9+7; int n; long long dp[111111][2][4]; long long solve(int a, int b, int c) { if (dp[a][b][c] >= 0) return dp[a][b][c]; if (a == n) return 1; long long res = 0; if (b == 0) { if (c < 2) { res = (res+solve(a+1, 0, c+1))%mod; } if (c > 0) { res = (res+solve(a+1, 1, 0))%mod; } } else { res = (res+solve(a+1, 0, c+1))%mod; } return dp[a][b][c] = res; } int main(void) { scanf("%d", &n); memset(dp, -1, sizeof(dp)); long long res = solve(0, 0, 0); printf("%lld\n", res); return 0; }