/*  AMAN MITTAL
    Computer Science and Engineering
    M.N.N.I.T. Allahabad
    INDIA   */
#include <bits/stdc++.h>

using namespace std;

#define LL long long int
#define LLU long long unsigned int

#define MAXAR 1100000
#define MOD 1000000007
#define INF (1<<20)
#define setbitint __builtin_popcount
#define setbitLL __builtin_popcountll
#define TEST(t) while(t--)

#define pb push_back
#define mp make_pair
#define X first
#define Y second

#define chk1(a)         cout<<endl<< #a <<": "<<a<<endl;
#define chk2(a,b)       cout<<endl<< #a <<": "<<a<<" "<< #b <<": "<<b<<endl;
#define chk3(a,b,c)     cout<<endl<< #a <<": "<<a<<" "<< #b <<": "<<b<<" "<< #c <<": "<<c<<endl;
#define chk4(a,b,c,d)   cout<<endl<< #a <<": "<<a<<" "<< #b <<": "<<b<<" "<< #c <<": "<<c<<" "<< #d <<": "<<d<<endl;


#define clr(a,b) memset(a,b,sizeof(a))

int dp[100000];
int solve(int n) {
	if(n < 0) {
		return 0;
	} 
	if(dp[n] != -1) {
		return dp[n];
	} else {
		return dp[n] =(solve(n-10) + solve(n-3) + solve(n-5));
	}
}
int main(int argc, char const *argv[])
{
	int i, n;
	clr(dp, -1);
	dp[0] = 1;
	cin >> n;
	cout << solve(n) << endl;
	return 0;
}