/* 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;
}
LyogIEFNQU4gTUlUVEFMCiAgICBDb21wdXRlciBTY2llbmNlIGFuZCBFbmdpbmVlcmluZwogICAgTS5OLk4uSS5ULiBBbGxhaGFiYWQKICAgIElORElBICAgKi8KI2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKI2RlZmluZSBMTCBsb25nIGxvbmcgaW50CiNkZWZpbmUgTExVIGxvbmcgbG9uZyB1bnNpZ25lZCBpbnQKCiNkZWZpbmUgTUFYQVIgMTEwMDAwMAojZGVmaW5lIE1PRCAxMDAwMDAwMDA3CiNkZWZpbmUgSU5GICgxPDwyMCkKI2RlZmluZSBzZXRiaXRpbnQgX19idWlsdGluX3BvcGNvdW50CiNkZWZpbmUgc2V0Yml0TEwgX19idWlsdGluX3B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