401918: GYM100574 E Valentine's Exam
Description
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 .
InputStorages with values n 0 0 0 in order.
1 ≤ n ≤ 105
OutputThe first storage should contain the answer.
ExamplesInput8 0 0 0Output
3Input
200 0 0 0Output
5