#include using namespace std; #define REP(i, n) for(int i = 0; i < n; i++) int MOD = 1e9 + 7; int main(){ cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; int dp[n + 1]; int kk[n + 1]; int kp[n + 1]; int pk[n + 1]; dp[1] = 1; dp[2] = 2; kk[2] = 1; kp[2] = 1; pk[2] = 0; for(int i = 3; i <= n; i++){ dp[i] = (dp[i - 1] + pk[i - 1]) % MOD; kk[i] = pk[i - 1] % MOD; kp[i] = (pk[i - 1] + kk[i - 1]) % MOD; pk[i] = kp[i - 1] % MOD; } cout << dp[n] << endl; return 0; }