E. Valentine's Exam
time limit per test
1 second
memory limit per test
64 megabytes
input
stdin
output
stdout

Saleh was hanging out hole Valentine's day with his love, Sahel. Today is February 15 and he has a mathematics exam and he doesn't know anything about prime decomposition. He is not an idiot and he can figure out how to decompose a number into primes, but right now he can't focus and the only thing he can do is singing in his head,

"I don't know you,  but I need more time

Promise me you'll be mine

Birds are flying over Europe's skies

Tell me please why can't I?..."

He asked you to help him and given storages n 0 0 0 using IDXT language calculate the following number and put it in the first storage :

where and p1 < p2 < ... < pk and for each i, pi is a prime number.

Your program's order mustn't exceed 107 .

Input

Storages with values n 0 0 0 in order.

1 ≤ n ≤ 105

Output

The first storage should contain the answer.

Examples
Input
8 0 0 0
Output
3
Input
200 0 0 0
Output
5