0.55 A friend of Professor Oak suggested him including some aromatic plants in his garden, and Prof. Oak thought that it was such a good idea. As you can see, now he has 11 such plants: 5 in the top row, and 6 in the bottom row. Hmm... so we have a prime number and a composite number that add up to a prime number. How common is that?
0.40
Input consists of several cases, each with an integer between 2 and .
For every , print the number of triples of integer numbers such that:
the three numbers are between 2 and ,
is prime, is composite, is prime,
and .
Input
6 7 11 1000 10000000
Output
0 1 5 13957 220832173370