///hdu 1028 母函数 一个数有几种相加方式
#include<stdio.h>
#include<string.h>
#include<iostream>
#include<algorithm>
#define INF 1000000009
using namespace std;
const int _max = 10001;
int c1[_max], c2[_max];
int main()
{
int n,i,j,k;
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;
}
anytime you feel the pain.hey,refrain.don't carry the world upon your shoulders