#K1576. Sum of Factors
Sum of Factors
Sum of Factors
This problem asks you to compute the sum of all positive divisors of a given integer \(n\). In other words, you need to calculate the sum of all integers \(d\) such that \(d\) divides \(n\) without leaving a remainder. The formula for the sum of factors can be thought as:
\[ S(n) = \sum_{d|n} d \]
For example, for \(n = 12\), the factors are \(1, 2, 3, 4, 6, 12\) and their sum is \(28\). Your task is to read an integer from stdin and output the sum of its factors to stdout.
inputFormat
The input consists of a single integer \(n\) provided via standard input.
outputFormat
Output a single integer representing the sum of all positive divisors of \(n\) to standard output.
## sample12
28
</p>