You are on your way to find the gifts. All the gifts lie in your path in a straight line at prime numbers and your house is at 0.Given your current position find the closest gift to your position, and calculate the distance between your current position and gift and tell the distance.
For the no.= 0, the output is 2.
The closest prime number to 0 is 2, so the answer is 2 - 0 = 2.
For number = 11, the output should be 0.
11 is a prime number, so the answer is 11 - 11 = 0.
[time limit] 3000ms [input] string number
Constraints: 0 ≤ int(number) ≤ 9 · 1014.