The connected graph is given. Find the spanning tree of minimal weight.
The first line contains two integers and (1 \leq n \leq 20000, 0 \leq m \leq 100000) - the number of vertices and number of edges in a graph. Each of the next lines describes one edge. The edge number is given with three integers b_i, e_i and w_i (1 \leq b_i, e_i \leq n, 0 \leq w_i \leq 100000) - the numbers of vertices and its weight.
Graph is connected.
Print one number - the weight of the minimal spanning tree.
Example 1