Problem: You are given an undirected tree, consisting of n vertices.

The vertex is called a leaf if it has exactly one vertex adjacent to it.

The distance between some pair of vertices is the number of edges in the shortest path between them.

Let's call some set of leaves beautiful if the maximum distance between any pair of leaves in it is less or equal to k.

You want to split all leaves into non-intersecting beautiful sets. What is the minimal number of sets in such a split?

Input

The first line contains two integers n and k (3 ≤ n ≤ 10^6, 1 ≤ k ≤ 10^6) — the number of vertices in the tree and the maximum distance between any pair of leaves in each beautiful set.

Each of the next n - 1 lines contains two integers v_i and u_i (1 ≤ v_i, u_i ≤ n) — the description of the i-th edge. 

It is guaranteed that the given edges form a tree.

Output

Print a single integer — the minimal number of beautiful sets the split can have. 

Examples

Input

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


Output

2


Input

5 3
1 2
2 3
3 4
4 5


Output

2


Input

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


Output

5

Note

Here is the graph for the first example:

<image>

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int M = 1e6 + 5;
vector<int> adj[M];
int mark[M], ans[M], dur[M];
int k, root;
void dfs(int v) {
  mark[v] = 1;
  int ch = 0;
  int ted = 0, MIN = M, MAX = -1;
  for (int u : adj[v])
    if (!mark[u]) {
      ch++;
      dfs(u);
      dur[u]++;
      ans[v] += ans[u];
      dur[v] = max(dur[v], dur[u]);
      if (dur[u] > k / 2)
        ted++, MIN = min(MIN, dur[u]);
      else
        MAX = max(MAX, dur[u]);
    }
  if (!ch)
    dur[v] = 0;
  else if (v != root) {
    if (!ted) return;
    ans[v] += ted - 1, dur[v] = MIN;
    if (MAX != -1 && MAX + MIN > k) ans[v]++, dur[v] = MAX;
  }
}
int32_t main() {
  int n;
  cin >> n >> k;
  memset(dur, -1, sizeof dur);
  for (int i = 1; i < n; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    adj[u].push_back(v), adj[v].push_back(u);
  }
  for (int i = 1; i <= n; i++)
    if (adj[i].size() > 1) {
      root = i, dfs(i);
      vector<int> vec;
      int MAX = -1, MIN = M, ted = 0;
      for (int u : adj[i]) {
        if (dur[u] <= k / 2)
          MAX = max(MAX, dur[u]);
        else
          MIN = min(MIN, dur[u]), ted++;
      }
      ans[i] += ted + (!ted ? 1 : 0) +
                (MIN != M && MAX != -1 && MIN + MAX > k ? 1 : 0);
      return cout << ans[i] << endl, 0;
    }
  return 0;
}