#include <bits/stdc++.h> using namespace std; const int MAXN = 33000; long long dp[MAXN] = {0}; int main () { dp[0] = 1; for (int i = 1; i <= 3; i++) { for (int j = i; j < MAXN; j++) { dp[j] += dp[j-i]; } } int n; while(~scanf("%d", &n)){ printf("%I64d ", dp[n]); } return 0; }