ByteLandia is a country consisting of several islands. After the recent presidential election, Bityk became the new president. He decided to visit the islands using his new RoverLand vehicle. To do this, some islands must be connected by bridges.
Because the country's budget is limited, all bridges must be constructed as one-way bridges (i.e., each bridge can only be traveled in a single direction). After Bityk visits some islands by car, a helicopter will return him and his vehicle to the capital (the helicopter flights are not budgeted, but it is the president's duty to travel on the new bridges by car).
Thus, the president's journey will always consist of two parts:
Travel by his RoverLand from the capital to another island;
Return by helicopter from the island back to the capital.
Every kilometer of bridge costs 1 ByteLandia tugrik. The president's architect has given Bityk a list of bridges that could theoretically be built without harming the islands' environment.
Help Bityk determine the minimum budget required so that it becomes possible to reach any island from the capital via the new bridges.
The first line contains two positive integers (1 \le N \le 10^4) — the number of islands, and (1 \le M \le 10^5) — the number of potential bridges. Each of the next lines contains three positive integers: (1 \le u \le N), (1 \le v \le N), (1 \le w \le 10^5), where and are island numbers connected by a bridge in a given direction, and is the length of the bridge. There may be multiple potential bridges with different lengths between two islands (in the same direction). The last line contains a single integer (1 \le X \le N) — the number of the island where the capital is located.
If there exists an island that Bityk cannot reach from the capital by car, output Helicopter (without quotes). Otherwise, output the minimum total cost of all bridges that need to be built.
Example 1