#include using namespace std; #ifdef _RUTHEN #include "debug.hpp" #else #define show(...) true #endif using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) template using V = vector; #include using namespace atcoder; using mint = modint1000000007; ostream &operator<<(ostream &os, const mint &p) { return os << p.val(); } int main() { ios::sync_with_stdio(false); cin.tie(0); int N; cin >> N; if (N <= 2) { cout << 0 << '\n'; return 0; } V dp(N + 1, 0); dp[0] = 1; for (int i = 0; i < N - 2; i++) { // w = i+3 for (int j = 0; j <= N; j++) { if (j + i + 3 <= N) dp[j + i + 3] += dp[j]; } } show(dp); cout << dp[N] << '\n'; return 0; }