1837: 【CSP函数】求完全数的个数█

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:4 Solved:3

Description

一个大于1的正整数若等于全部因子的和,则称此数为完全数。例如: lns="http://www.w3.org/1998/Math/MathML">6 有因子 lns="http://www.w3.org/1998/Math/MathML">1,2,3 。同时 lns="http://www.w3.org/1998/Math/MathML">6=1+2+3 ,所以 lns="http://www.w3.org/1998/Math/MathML">6 是完全数。

Input

一个正整数 lns="http://www.w3.org/1998/Math/MathML">N ( lns="http://www.w3.org/1998/Math/MathML">10N100000 )

Output

小于等于 lns="http://www.w3.org/1998/Math/MathML">N 的完全数的个数。

Sample Input Copy

10

Sample Output Copy

1