Problem: Masha lives in a country with cities numbered from to . She lives in the city number .
There is a direct train route between each pair of distinct cities and , where . In total there are distinct routes. Every route has a cost, cost for route from to may be different from the cost of route from to .
Masha wants to start her journey in city , take exactly routes from one city to another and as a result return to the city . Masha is really careful with money, so she wants the journey to be as cheap as possible. To do so Masha doesn't mind visiting a city multiple times or even taking the same route multiple times.
Masha doesn't want her journey to have odd cycles. Formally, if you can select visited by Masha city , take odd number of routes used by Masha in her journey and return to the city , such journey is considered unsuccessful.
Help Masha to find the cheapest (with minimal total cost of all taken routes) successful journey.
Input Format: First line of input had two integer numbers (): number of cities in the country and number of routes in Masha's journey. It is guaranteed that is even.
Next lines hold route descriptions: -th number in -th line represents the cost of route from to if , and is 0 otherwise (there are no routes ). All route costs are integers from to .
Output Format: Output a single integer — total cost of the cheapest Masha's successful journey.