#P11416. Divisibility Query

    ID: 13494 Type: Default 1000ms 256MiB

Divisibility Query

Divisibility Query

Given a positive integer n, count the number of integers m such that 0 < m < n and the product n × m is divisible by n - m. In other words, find the number of integers m satisfying

\( (n\times m) \bmod (n-m) = 0 \).

inputFormat

The input consists of a single integer n (2 \le n \le 10^9), which is the given number.

outputFormat

Output a single integer representing the number of valid m satisfying the condition.

sample

2
1