You are given a directed graph . Each edge has a specified capacity. Find the maximum flow from vertex to vertex .
The first line contains two integers and (2 \leq n \leq 500, 1 \leq m \leq 10000) — the number of vertices and the number of edges in the graph. Each of the next lines describes an edge with three integers: the starting vertex, the ending vertex, and the capacity of the edge. The capacity of each edge does not exceed 10^9.
Output the value of the maximum flow from vertex to vertex .
Example 1