// yukicoder My Practice // author: Leonardone @ NEETSDKASU #include #include using namespace std; typedef long long ll; typedef unsigned long long ull; const ll MD = 1000000007LL; const ull UMD = 1000000007ULL; ll cmb(ll n, ll c) { ll r = 1LL; c = min(c, n - c); for (ll i = 1; i <= c; i++) { r *= n--; r /= i; } return r % MD; } ull fnc(ll n) { ll c = 0LL; ll i = 0LL; if (n > 0LL && (n & 1LL)) { i = 1LL; n -= 3LL; } ll d = n >> 1; while (d >= 0LL) { c = (c + cmb(d + i, i)) % MD; i += 2LL; d -= 3LL; } return ull(c); } void solve() { ll n; cin >> n; ull ans = (((fnc(n) + fnc(n - 1)) % UMD) + fnc(n - 2)) % UMD; cout << ans << endl; } int main() { solve(); return 0; }