http://acm.hdu.edu.cn/showproblem.php?pid=1028
//1304357 2009-04-24 14:49:41 Accepted 1028 15MS 260K 526 B C++ no way 
#include<iostream>
using namespace std;
int main()
{
    
int i,j,k,n;
    
while(cin>>n)
    
{
        
int temp[121],outs[121];
        
for(i=0; i<=n; i++//只有1的时候
        {
            outs[i] 
= 1
            temp[i] 
= 0;
        }

        
for(i=2;i<=n;i++)
        
{
            
for(j=0;j<=n;j++)
            
{
                
for(k=0;k+j<=n;k+=i)
                
{
                    temp[k
+j] += outs[j];
                }

            }

            
for(j=0;j<=n;j++)
            
{                
                outs[j] 
= temp[j];
                temp[j] 
= 0;
            }

        }

        cout
<<outs[n]<<endl;
    }

    
return 0;
}