Ivan has number b. He is sorting through the numbers aa from 11 to 10181018, and for every aa writes [a,b]a[a,b]a on blackboard. Here [a,b][a,b] stands for least common multiple of aa and bb. Ivan is very lazy, that's why this task bored him soon. But he is interested in how many different numbers he would write on the board if he would finish the task. Help him to find the quantity of different numbers he would write on the board.
Input
The only line contains one integer — bb (1≤b≤1010)(1≤b≤1010).
Output
Print one number — answer for the problem.
Examples
Input
1
Output
1
Input
2
Output
2
Note
In the first example [a,1]=a[a,1]=a, therefore [a,b]a[a,b]a is always equal to 11.
In the second example [a,2][a,2] can be equal to aa or 2⋅a2⋅a depending on parity of aa. [a,b]a[a,b]a can be equal to 11 and 22.
好久没写博客了,结果写博客是因为最近比较水逆,总是头铁。
这道题的意思就是让你求从a到很大一个数的lcm([a,b])/a有多少个不一样的值,然后你的用数论的知识lcm([a,b])/a=b/gcd(a,b);
也就是让你求b的因子个数。
#include<stdio.h>
#include<string.h>
#include<queue>
#include<math.h>
#include<algorithm>
using namespace std;
int main()
{
long long n;
scanf("%lld",&n);
long long m=sqrt(n);
long long ans=0;
for(long long i=1; i<=m; i++)
{
if(n%i==0)
ans+=2;
}
if(m*m==n)
ans-=1;
printf("%lld\n",ans);
return 0;
}