#include using namespace std; using ll = long long; #define rep(i, s, e) for (int i = (int)s; i < (int)e; ++i) #define all(a) (a).begin(), (a).end() const ll mod = 1e9 + 7; int main() { cin.tie(nullptr); int N; cin >> N; vector dp(N, vector(3)); dp[0][0] = 1; dp[0][1] = 0; dp[0][2] = 0; rep(i, 1, N) { dp[i][0] = dp[i - 1][2]; dp[i][1] = dp[i - 1][0]; dp[i][2] = (dp[i - 1][0] + dp[i - 1][1]) % mod; } ll ans = 0; rep(i, 0, 3) ans += dp[N - 1][i]; cout << ans % mod << '\n'; }