Adventure of our mysterious hero Sin continues after saving the queen. :
This time Sin has has to pursue the wizard who abducted the queen.
The wizard lives in an island far from the kingdom.
There are n Demon towers between the Kingdom and the island.
In order to reach the wizard Sin needs to Destroy all the Demon towers in the way.
Towers are connected to each other via mysterious energy.
The ithtower has power ti.All pairs are unique. In order to destroy a Demon tower ti the amount of energy Sin has to spend is equivalent to the sum of the powers of the tower connected to the tower ti.
Since Sin is too badly injured from the previous battle, so he cannot use up much of his strength or he may die.
Help Sin to calculate the minimum amount of energy he has to spend in order to destroy all the towers.
Constraints
1<=n,m<=105
1<=u,v<=n
0<=pi<=109
Input
the first line contains n and m denoting the number of towers and connections between them.
The next line contains n integers denoting the power of each tower Pi.
The next m line contains u and v denoting that tower u is connected with tower v.
Output
Print minimum strength required to destroy the base.