Question :

**Edge Deletion**

You are given a tree of N nodes and an integer K. Each node contains an integer stored in it. You are required to delete the minimum number of edges (possibly 0) from the tree such that after deletion of that edges the sum of every individual tree formed is less than or equal to K

**Input Format**

- First line : Two space-separated integer N and K.
- Next line : N space-separated integers where an i_{th} integer denotes the value stored in the i_{th} node
- Next N - 1 lines : Two space-separated integers U and V which denotes there is an edge between node U and V

**Output Format**

Print an integer answer to the question

**Constraints**

1 \leq N \leq 10^5

1 \leq K \leq 10^9

1 \leq value stored in every node \leq K

1 \leq U, V \leq N

**Sample Input**

7 8

4 3 2 7 2 1 6

1 2

1 3

1 4

3 5

3 6

4 7

**Sample Output**

3

**Explaination**

How to approach this problem?