SP3505 CPRIME - Prime Number Theorem

Description

In number theory, the Prime Number Theorem describes the asymptotic distribution of prime numbers. Let $\pi(x)$ be the number of prime numbers not greater than $x$. The Prime Number Theorem states that: $$\pi(x)\sim\frac x{\ln x}$$ Your task is to write a program to verify how well the Prime Number Theorem can estimate $\pi(x)$. To be more precise, for a given $x$, you have to calculate the percent error $\frac{|\pi(x)-\frac x{\ln x}|}{\pi(x)}\times100\%$.

Input Format

The input contains several test cases (no more than $1000$). Each test case contains a value of $x$ $(2\le x\le10^8)$ given in one line. A number $0$ terminates the input.

Output Format

For each value of $x$, output the percent error of the estimation of $\pi(x)$, rounded to $1$ decimal digit.