20120108 - 堆木头
                            Time Limit : 2 秒
                        
                        
                            Memory Limit : 128 MB
                        
                    有n根木头(2<=n<=10^20),堆成k层(2≤k≤n),要求下层木头数为上层木头数加1.
例如:

Input
n 一个整数
Output
一个整数 即堆法数,若不可能,则输出0.
Examples
Input
21
Output
3
Hint
