#P7884. Count Primes
Count Primes
Count Primes
Given an integer \(n\), calculate \(\pi(n)\), which represents the number of prime numbers between 1 and \(n\) (inclusive).
inputFormat
The input consists of a single integer \(n\) (\(1 \leq n \leq 10^7\)).
outputFormat
Output a single integer, the value of \(\pi(n)\), which is the count of prime numbers between 1 and \(n\) (inclusive).
sample
10
4