Sum sum sum - MarisaOJ: Marisa Online Judge

Sum sum sum

Time limit: 1000 ms
Memory limit: 256 MB
Let $f(i, j)$ be the sum of all positive divisors that $i$ and $j$ have in common. For example, $f(8, 12) = 1 + 2 + 4 = 7$. Calculate the sum of all $f(i, j)$ for $1 \le i \le j \le n$. In other words, calculate: $$ \sum_{i=1}^{n} \sum_{j=i}^{n} f(i, j) $$ ### Input - A single line containing an integer $n$. ### Output - Print the result of the calculation modulo $10^9 + 7$. ### Constraints - $1 \le n \le 10^{14}$. ### Sample Test Input: ``` 5 ``` Output ``` 33 ```