Fun with Integers

You are given a positive integer nn greater or equal to 22 . For every pair of integers aa and bb (2≤|a|,|b|≤n2≤|a|,|b|≤n ), you can transform aa into bb if and only if there exists an integer xx such that 1<|x|1<|x| and (a⋅x=ba⋅x=b or b⋅x=ab⋅x=a ), where |x||x| denotes the absolute value of xx .

After such a transformation, your score increases by |x||x| points and you are not allowed to transform aa into bb nor bb into aa anymore.

Initially, you have a score of 00 . You can start at any integer and transform it as many times as you like. What is the maximum score you can achieve?

Input

A single line contains a single integer nn (2≤n≤1000002≤n≤100000 ) — the given integer described above.

Output

Print an only integer — the maximum score that can be achieved with the transformations. If it is not possible to perform even a single transformation for all possible starting integers, print 00 .

Examples

Input

4

Output

8

Input

6

Output

28

Input

2

Output

0

Note

In the first example, the transformations are 2→4→(−2)→(−4)→22→4→(−2)→(−4)→2 .

In the third example, it is impossible to perform even a single transformation.

题意很简单,就是在区间2到n之间,找寻有多少对a*x=b或者b*x=a的x的绝对值总和,看代码你可能更容易理解,虽然我做的时候一直不敢暴力,导致被卡了很久,但是暴力还是很棒的。记住都是绝对值的,并且a和b的情况要数清楚。

#include<stdio.h>
#include<string.h>
#include<algorithm>
#include<iostream>
#include<string>
#include<map>
#include<math.h>
#define inf 0x3f3f3f3f
using namespace std;
int main()
{
    long long int n;
    while(~scanf("%lld",&n))
    {
        if(n==2)
            printf("0\n");
        else
        {
            long long num=0;
            for(long long i=2; i<=n; i++)
            {
                for(long long j=2;; j++)
                {
                    if(i*j>n)
                        break;
                    num+=j*4;
                }
            }
            printf("%lld\n",num);
        }
    }
    return 0;
}
 

猜你喜欢

转载自blog.csdn.net/aini875/article/details/84640780