Jumping on a Tree

아직 제출이 없습니다시간 제한4초메모리 제한512 MB

문제

You are given a tree on nn vertices. Suppose we are at the vertex vv. In one step we can go from vv to any other vertex uu such that there are exactly dd edges on the shortest path between vv and uu. A vertex uu is reachable from vv if we can get to uu from vv using zero or more steps.

Naturally, all vertices can be divided into reachability classes. A reachability class is a set of vertices CC such that any vertex in CC is reachable from any other vertex in CC, but no vertex which is not in CC is reachable from any vertex in CC. How many reachability classes are there in the given tree?

입력

The first line contains two space-separated integers nn and dd (1n1061 \leq n \leq 10^6, 0dn0 \leq d \leq n).

Next n1n - 1 lines describe edges of the tree. Each line contains two space-separated integers --- indices of vertices connected by the corresponding edge. Indices are 1-based.

출력

Print one integer --- the number of reachability classes.