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;
long long i, i1, j, k, k1, t, n, m, res, flag[10], a, b, dg[1000010], r,
    dist[1000010];
bool visited[1000010];
vector<long long> adj[1000010];
multiset<long long> sbs[1000010];
void merge(long long s) {
  while (true) {
    if (sbs[s].size() < 2) break;
    a = (*sbs[s].begin());
    sbs[s].erase(sbs[s].begin());
    b = (*sbs[s].begin());
    sbs[s].erase(sbs[s].begin());
    if (a + b - 2 * dist[s] <= k) {
      sbs[s].insert(b);
    } else {
      sbs[s].insert(a);
      sbs[s].insert(b);
      break;
    }
  }
}
void clean(long long s) {
  while (true) {
    if (sbs[s].size() < 2) break;
    a = (*prev(sbs[s].end()));
    sbs[s].erase(prev(sbs[s].end()));
    b = (*prev(sbs[s].end()));
    sbs[s].erase(prev(sbs[s].end()));
    if (a + b - 2 * dist[s] > k) {
      sbs[s].insert(b);
      res++;
    } else {
      sbs[s].insert(a);
      sbs[s].insert(b);
      break;
    }
  }
}
void dfs(long long s) {
  long long flag = 1;
  for (auto u : adj[s]) {
    if (visited[u]) continue;
    visited[u] = true;
    flag = 0;
    dist[u] = dist[s] + 1;
    dfs(u);
    if (sbs[s].size() < sbs[u].size()) swap(sbs[s], sbs[u]);
    for (auto x : sbs[u]) sbs[s].insert(x);
  }
  merge(s);
  clean(s);
  if (flag == 1) sbs[s].insert(dist[s]);
}
void init(long long s) {
  for (i = 1; i <= n; i++) visited[i] = false;
  visited[s] = true;
  dist[s] = 0;
  dfs(s);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  for (i = 0; i < n - 1; i++) {
    cin >> a >> b;
    adj[a].push_back(b);
    adj[b].push_back(a);
    dg[a]++;
    dg[b]++;
  }
  for (r = 1; r <= n; r++) {
    if (dg[r] > 1) break;
  }
  res = 0;
  init(r);
  cout << sbs[r].size() + res;
  return 0;
}