#include #include #include #include using namespace std; #define INF 2000000007 #define MOD 1000000007 #define MAX 1000005 #define REP(i,n) for(int i=0;i<(n);++i) #define REPS(i,s,t) for(int i=(s);i<(t);++i) typedef unsigned long long int ull; int main(){ int N;cin >> N; unsigned int dp[MAX]; dp[0]=dp[1]=0; dp[2]=dp[3]=1; REPS(i,4,N+1){ dp[i] = (dp[i-2]+dp[i-3])%MOD; } dp[1]=1; cout << (dp[N] + dp[N-1] + dp[N-2])%MOD << endl; }