#include using namespace std; int main(){ int N,ans=0; cin>>N; for(int i=0;i<34;i++) for(int j=0;j<=20;j++) for(int k=0;k<15;k++) if(i*3+j*5+k*7==N)ans++; cout<