#ABC254D. [ABC254D] Together Square

[ABC254D] Together Square

Score : 400400 points

Problem Statement

You are given an integer NN. Find the number of pairs (i,j)(i,j) of positive integers at most NN that satisfy the following condition:

  • i×ji \times j is a square number.

Constraints

  • 1N2×1051 \le N \le 2 \times 10^5
  • NN is an integer.

Input

Input is given from Standard Input in the following format:

NN

Output

Print the answer.

4
6

The six pairs (1,1),(1,4),(2,2),(3,3),(4,1),(4,4)(1,1),(1,4),(2,2),(3,3),(4,1),(4,4) satisfy the condition.

On the other hand, (2,3)(2,3) does not, since 2×3=62 \times 3 =6 is not a square number.

254
896