Byang is the chief software engineer at Toad Incorporated. His grandmother is planning to give him a visit. But his grandmother is old and weak. She walks very slowly and cannot take long footsteps anymore. And most importantly, she hates “Kochuripana”.
Byang discovered that the only road to his house has some “Kochuripana”. He took notes on where the “Kochuripanas” are located. Then he passed the notes to you and told you that his grandmother always takes equal sized footsteps. Byang wonders what is the minimum length of footstep his grandmother can take so that she does not have to step on any “Kochuripana”. Now it is your job to find the answer.
Let’s denote positive X-axis as the only road to Byang’s house. Byang’s grandmother will start to walk from point 0. There are “Kochuripanas” at integer points , ,...., . You have to find the minimum length of footstep Byang’s grandmother can take so that she does not step on any “Kochuripana”. Note that, if Byang’s grandmother takes footsteps of size , then she will step on these points: 0, , , , ... Also note that, Byang’s grandmother always takes footsteps of integer length.
On the first line a positive integer ()
On the next N lines there will be one integer ().
Only one line with one integer, the minimum length of footstep Byang's grandmother should take to avoid "Kochuripana".
4 2 3 7 8