#include using namespace std; typedef long long ll; ll mod = 1e9 + 7; ll dp[1000001][3]; int main() { int n; cin >> n; dp[0][0] = 1; for(int i = 0; i < n; i++) { dp[i+1][0] = (dp[i][1] + dp[i][2]) % mod; dp[i+1][1] = dp[i][0]; dp[i+1][2] = dp[i][1]; } cout << ((dp[n][0] + dp[n][1]) % mod + dp[n][2]) % mod << endl; }