#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
int n,i;
int a[4]={1,2,3,4};
//cin>>n;
while(next_permutation(a,a+4)){ for(i=0;i<4;i++)
cout<<a[i]<<" ";
cout<<endl;}
return 0;
}
//排列的模板
*/
#include <iostream>
using namespace std;
int main()
{
int i,j,k,n,m;
int c1[1001],c2[1001];
while(cin>>n)
{
for(i=0;i<=n;i++)
{
c1[i]=1;
c2[i]=0;
}
for(i=2;i<=n;i++)
{
for(j=0;j<=n;j++)
for(k=0;k+j<=n;k+=i)
c2[j+k]+=c1[j];
for(j=0;j<=n;j++)
{
c1[j]=c2[j];
c2[j]=0;
}
}
cout<<c1[n]<<endl;
}
return 0;
}
//母函数模板