#jag2017autumne. [jag2017autumn_e]Tree Separator

[jag2017autumn_e]Tree Separator

MathJax.Hub.Config({ tex2jax: { inlineMath: [["","",""], ["\\(","\\)"]], processEscapes: true }}); blockquote { font-family: Menlo, Monaco, "Courier New", monospace; color: #333333; display: block; padding: 8.5px; margin: 0 0 9px; font-size: 16px; line-height: 18px; background-color: #f5f5f5; border: 1px solid rgba(0, 0, 0, 0.15); -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; white-space: pre; white-space: pre-wrap; word-break: break-all; word-wrap: break-word; }

Problem Statement

You are given a tree TT and an integer KK. You can choose arbitrary distinct two vertices uu and vv on TT. Let PP be the simple path between uu and vv. Then, remove vertices in PP, and edges such that one or both of its end vertices is in PP from TT. Your task is to choose uu and vv to maximize the number of connected components with KK or more vertices of TT after that operation.


Input

The input consists of a single test case formatted as follows.

NKN \\ K u_1v_1u\_1 \\ v\_1 vdots\\vdots u_N1v_N1u\_{N-1} \\ v\_{N-1}

The first line consists of two integers N,K(2leNle100,000,1leKleN)N, K \\ (2 \\le N \\le 100{,}000, 1 \\le K \\le N). The following N1N-1 lines represent the information of edges. The (i+1)(i+1)-th line consists of two integers $u\_i, v\_i \\ (1 \\le u\_i, v\_i \\le N \\text{ and } u\_i \\ne v\_i \\text{ for each } i)$. Each u_i,v_i\\{u\_i, v\_i\\} is an edge of TT. It's guaranteed that these edges form a tree.

Output

Print the maximum number of connected components with KK or more vertices in one line.


Sample Input 1

2 1
1 2

Output for Sample Input 1

0

Sample Input 2

7 3
1 2
2 3
3 4
4 5
5 6
6 7

Output for Sample Input 2

1

Sample Input 3

12 2
1 2
2 3
3 4
4 5
3 6
6 7
7 8
8 9
6 10
10 11
11 12

Output for Sample Input 3

4

Sample Input 4

3 1
1 2
2 3

Output for Sample Input 4

1

Sample Input 5

3 2
1 2
2 3

Output for Sample Input 5

0

Sample Input 6

9 3
1 2
1 3
1 4
4 5
4 6
4 7
7 8
7 9

Output for Sample Input 6

2