### ** removeedges**

Shiwei city is a connected undirected graph with N cities and M roads, with cities numbered 1 to N and roads numbered from 1 to M. City i has a value of X_{i} and edge i has a values of Y_{i} connecting node A_{i} and B_{i}.

Zane the (redacted) wants to remove some edges to make Shiwei happy. Specifically, Shiwei hopes that for each roads not removed, the sum of the values of the cities in the connected component containing that road is greater than or equal to the value of that roads.

Zane is lazy. Find the minimum number of edges that need to be removed.

### Constraints

1 ≤ N ≤ 10

^{5}
N-1 ≤ M ≤ 10

^{5}
1 ≤ X

_{i}, Y

_{i} ≤ 10

^{9}
The given graph is connected.

### Input Format

First line of input contains 2 integers N and M

Next line contains N integers representing X

Next M lines contain 3 integers, A_{i}, B_{i}, Y_{i}

### Output Format

Output the minimum number of roads Zane needs to destroy

### Sample

Input:

4 4

2 3 5 7

1 2 7

1 3 9

2 3 12

3 4 18

Output:

2