Tim needs to reach the Binary Analog Probing Conference (BAPC) on time, but he is running late. He is not sure if he can even make it on time without exceeding the speed limit! He does not like speeding, so he would like to minimize the amount that he needs to speed and plans his route accordingly. If he decides to speed by $x\text{ km/h}$, he will exceed the speed limit everywhere by exactly $x\text{ km/h}$.
Help Tim find the minimal amount that he needs to speed by to get to the BAPC in time.
As an example, consider the first sample case. Without speeding, Tim will take $\frac{400}{40} + \frac{300}{20} = 25\text{ hours}$ to drive from intersection $1$, via intersection $3$, to intersection $4$. In order to arrive in time, he will need to exceed the speed limit by $10\text{ km/h}$, in which case his driving time will be $\frac{400}{40+10} + \frac{300}{20+10} = 18\text{ hours}$, following the same route.
The input consists of:
The intersections are numbered between $1$ and $n$, inclusive.
Tim will start at intersection $1$ and drive to intersection $n$, which is guaranteed to be reachable.
Output how much Tim needs to exceed the speed limit, in km/h. If Tim can reach his destination without speeding, output $0$.
Your answer should have an absolute or relative error of at most $10^{-6}$.