- 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 consist of exactly edges.
Input
The first input line contains two integers and : the number of nodes and the path length. 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 1 2 2 3 3 4 3 5
Output:
4