/*************************************************
Author :supermaker
Created Time :2015/11/23 0:15:25
File Location :C:\Users\abcd\Desktop\TheEternalPoet
**************************************************/
#pragma comment(linker, "/STACK:102400000,102400000")
#include <set>
#include <bitset>
#include <list>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <string>
#include <vector>
#include <ios>
#include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <utility>
#include <complex>
#include <numeric>
#include <functional>
#include <cmath>
#include <ctime>
#include <climits>
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cassert>
using namespace std;
#define CFF freopen ("aaa.txt", "r", stdin)
#define CPPFF ifstream cin ("aaa.txt")
#define DB(ccc) cout << #ccc << " = " << ccc << endl
#define PB push_back
#define MP(A, B) make_pair(A, B)
typedef long long LL;
typedef unsigned long long ULL;
typedef double DB;
typedef pair <int, int> PII;
typedef pair <int, bool> PIB;
const int INF = 0x7F7F7F7F;
const int MOD = 1e9 + 7;
const double EPS = 1e-10;
const double PI = 2 * acos (0.0);
const int maxn = 1e5 + 6666;
LL dp[maxn];
int main()
{
//CFF;
//CPPFF;
int n;
while (scanf ("%d", &n) != EOF)
{
memset (dp, 0, sizeof (dp));
dp[0] = 1;
for (int i = 1; i <= 3; i++)
{
for (int j = i; j <= n; j++)
dp[j] += dp[j-i];
}
printf ("%lld\n", dp[n]);
}
return 0;
}