P7884 [Template] Meissel-Lehmer
Description
Given an integer $n$, find the value of $\pi(n)$.
$\pi(n)$ denotes the number of prime numbers among the integers from $1$ to $n$.
Input Format
One line with one integer $n$.
Output Format
One line with one integer, representing the required value.
Explanation/Hint
For $100\%$ of the testdata, $1 \leq n \leq 10^{13}$.
Translated by ChatGPT 5