The first line contains a single integer, representing the number of vertices in the graph.
The second line containspositive integers
.
Output a single line with a single integer, representing the total weight of the edges in the minimum spanning tree of.