#K85447. Count Prime Factors of Factorial
Count Prime Factors of Factorial
Count Prime Factors of Factorial
Given a non-negative integer \( N \), determine the number of distinct prime factors of \( N! \) (i.e. the factorial of \( N \)). Notice that since \( N! \) is the product of all integers from 1 to \( N \), every prime number less than or equal to \( N \) will appear as a factor in \( N! \). Therefore, the answer is the number of prime numbers \( p \) such that \( 2 \leq p \leq N \).
Example: For \( N = 5 \), the primes \( 2, 3, \) and \( 5 \) are less than or equal to 5, so the result is 3.
inputFormat
The input consists of a single line containing one integer \( N \) (where \( 0 \leq N \leq 10^6 \)).
outputFormat
Output a single integer, which is the number of distinct prime factors of \( N! \).
## sample1
0