#include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef pair P; typedef double db; const ll mod=1e9+7; ll n; ll dp[1000001][3]; ll rec(ll n,ll k){//k 0:pa 1:ken1 2:ken2 3:ken3 if(dp[n][k]) return dp[n][k]; if(n==0) return 1; ll res=0; if(k>0) res+=rec(n-1,0); if(k<2) res+=rec(n-1,k+1); return dp[n][k]=res%mod; } int main() { cin>>n; printf("%lld\n",rec(n,0)); }