#C9350. Sum of Unique Prime Factors

    ID: 53434 Type: Default 1000ms 256MiB

Sum of Unique Prime Factors

Sum of Unique Prime Factors

Given a positive integer \(n\), your task is to compute the sum of all unique prime factors of \(n\). A prime factor of \(n\) is a prime number that divides \(n\) without leaving a remainder. If \(n < 2\), there are no prime factors, and the output should be 0.

For example, if \(n = 12\), the prime factors are \(2\) and \(3\), and their sum is \(5\). Similarly, for \(n = 30\), the prime factors are \(2, 3,\) and \(5\), and the sum is \(10\).

Note: All formulas are presented in \(\LaTeX\) format.

inputFormat

The input consists of a single integer \(n\) provided via standard input (stdin).

outputFormat

Output a single integer which is the sum of all unique prime factors of \(n\), printed to standard output (stdout).

## sample
12
5

</p>