- Time limit: 2.00 s
- Memory limit: 128 MB
Uolevi wants to travel from Possula to Kärsälä. You know all flights between the cities in the country and their prices.
Each flight gives you a bonus coupon that has some value between and . If you use the coupon, you have to pay only percent of the total price of the trip. However, you can use at most one coupon.
What is the lowest price for a trip from Possula to Kärsälä?
Input
The first input line contains two integers and : the number of cities and the number of flights. The cities are numbered . City 1 is Possula, and city is Kärsälä.
After this, the input contains lines that describe the flights. Each line contains four integers , , and . This means that there is a flight from city to city with price and bonus . All flights are oneway flights.
Output
You should output the lowest price for Uolevi's trip. It is guaranteed that there is always a sequence of flights from Possula to Kärsälä. An output is considered correct if it has absolute error less than .
Constraints
Example
Input:
3 4 1 2 2 31 2 1 3 39 2 3 8 56 1 3 5 92
Output:
3.1
Explanation: You can use route . The total price is but you have to pay only using the bonus coupon whose value is .