#K66527. Sum of Distinct Prime Factors

    ID: 32440 Type: Default 1000ms 256MiB

Sum of Distinct Prime Factors

Sum of Distinct Prime Factors

Given an integer NN, compute the sum of its distinct prime factors. If a prime factor appears more than once in the prime factorization of NN, it should be included only once. Since the computed sum might be very large, output the result modulo 109+710^9+7.

For example, if N=28N = 28, its prime factorization is 22×72^2 \times 7, so the distinct prime factors are 22 and 77, and the answer is 2+7=92 + 7 = 9.

inputFormat

The input consists of a single integer NN (1N1091 \le N \le 10^9) provided via standard input.

outputFormat

Output a single integer representing the sum of the distinct prime factors of NN, modulo 109+710^9+7, to standard output.## sample

28
9