Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/sonlar-boluvchilar-yigindilari

Sum of divisor sums

Hard 1000 ms 128 MB 67%
Share

$\sigma(k)$ is the sum of all positive divisors of $k$ (for example, $\sigma(6) = 1 + 2 + 3 + 6 = 12$). You are given a positive integer $n$. Find $\sigma(1) + \sigma(2) + \ldots + \sigma(n)$ modulo $10^{9} + 7$. For example, for $n = 5$ it is $1 + 3 + 4 + 7 + 6 = 21$.

The numbers from 1 to n; every divisor d under its multiples, the d with the same quotient n over d grouped

Input

One positive integer $n$.

Output

One integer — the sum modulo $10^{9} + 7$.

Note

$1 \le n \le 10^{10}$

Examples

Input #1
5
Output #1
21
Input #2
1
Output #2
1

Sign in to submit a solution

Signing up is free and takes a minute.