- Time limit: 1.00 s
- Memory limit: 512 MB
Given a tree of nodes, your task is to count the number of distinct paths that have at least and at most edges.
Input
The first input line contains three integers , and : the number of nodes and the path lengths. The nodes are numbered .
Then there are lines describing the edges. Each line contains two integers and : there is an edge between nodes and .
Output
Print one integer: the number of paths.
Constraints
Example
Input:
5 2 3 1 2 2 3 3 4 3 5
Output:
6