#include using namespace std; typedef long long ll; const int MOD = 1000000007; #define REP(i,n) for((i)=0;(i)<(int)(n);(i)++) ll dp[1000010]; int main(){ int n; cin >> n; dp[1] = 1; dp[2] = dp[3] = 2; for (int i = 4; i <= n; i++) dp[i] = (dp[i - 2] + dp[i - 3]) % MOD; cout << dp[n] << endl; return 0; }