Product Divisible by Sum

View as PDF

Submit solution


Points: 1
Time limit: 1.5s
Memory limit: 256M

Problem types

Let \(f(n)\) denote the number of positive integers \(x\) such that \(n+x\) divides \(n \cdot x\).

For a given positive integer \(n\), calculate the sum of \(f(i)\)'s for each positive integer \(i\) from \(1\) to \(n\), that is, \(f(1) + f(2) + \dots + f(n)\).

Input

The only line contains one integer, \(n\).

  • \(1 \le n \le 10^5\)

Output

Print \(f(1) + f(2) + \dots + f(n)\).

Example

Input 1:

1

Output 1:

0

Input 2:

6

Output 2:

9

Explanation

Input 1: For any positive integer \(x\), \(1 \cdot x\) is smaller than \(1 + x\). Thus, \(f(1) = 0\).

Input 2:

  • \(f(1) = 0\)
  • \(f(2) = 1 \quad (x = 2)\)
  • \(f(3) = 1 \quad (x = 6)\)
  • \(f(4) = 2 \quad (x = 4, 12)\)
  • \(f(5) = 1 \quad (x = 20)\)
  • \(f(6) = 4 \quad (x = 3, 6, 12, 30)\)