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;
int gint() {
  int ret = 0, fh = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') fh = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    ret = (ret << 3) + (ret << 1) + c - '0';
    c = getchar();
  }
  return ret * fh;
}
int n, m, cte, num, S;
int head[1001000], fa[1001000], inc[1001000];
struct Edge {
  int to, nxt;
} edge[1001000 * 2];
void ae(int u, int v) {
  cte++;
  edge[cte].to = v, inc[v]++;
  edge[cte].nxt = head[u], head[u] = cte;
}
int dep[1001000], sz[1001000], son[1001000], tp[1001000];
void dfs1(int u, int dad) {
  for (int j = head[u]; j; j = edge[j].nxt) {
    int v = edge[j].to;
    if (v == dad) continue;
    fa[v] = u, dep[v] = dep[u] + 1;
    dfs1(v, u);
    sz[u] += sz[v];
    son[u] = sz[v] > sz[son[u]] ? v : son[u];
  }
  sz[u]++;
}
void dfs2(int u) {
  if (son[u]) tp[son[u]] = tp[u], dfs2(son[u]);
  for (int j = head[u]; j; j = edge[j].nxt) {
    int v = edge[j].to;
    if (v == fa[u] || v == son[u]) continue;
    tp[v] = v;
    dfs2(v);
  }
}
int Lca(int x, int y) {
  while (tp[x] != tp[y]) {
    if (dep[tp[x]] < dep[tp[y]]) swap(x, y);
    x = fa[tp[x]];
  }
  return dep[x] < dep[y] ? x : y;
}
vector<int> to[1001000];
int ma[1001000];
int cmp(int x, int y) { return ma[x] < ma[y]; }
int solve(int u) {
  int ans = 0, l, r;
  for (int j = head[u]; j; j = edge[j].nxt) {
    int v = edge[j].to;
    if (v == fa[u]) continue;
    to[u].push_back(v);
    ans += solve(v);
  }
  int tot = to[u].size();
  sort(to[u].begin(), to[u].end(), cmp);
  if (!tot) {
    ma[u] = 1;
    return 0;
  }
  if (tot == 1) {
    ma[u] = ma[to[u][tot - 1]];
  } else if (ma[to[u][tot - 1]] + ma[to[u][tot - 2]] <= m)
    ma[u] = ma[to[u][tot - 1]];
  else {
    l = 0, r = tot - 1;
    while (r > 0 && l < r && ma[to[u][r]] + ma[to[u][r - 1]] > m) {
      for (; l < r && ma[to[u][r]] + ma[to[u][l]] <= m; l++)
        ;
      r--, ans++;
    }
    ma[u] = ma[to[u][r]];
  }
  ma[u] += (ma[u] > 0 ? 1 : 0);
  return ans;
}
int main() {
  scanf("%d%d", &n, &m);
  int x, y;
  for (int i = 1; i < n; i++) x = gint(), y = gint(), ae(x, y), ae(y, x);
  for (int i = 1; i <= n; i++)
    if (inc[i] != 1) {
      S = i;
      break;
    }
  dep[S] = 1, dfs1(S, -1);
  tp[S] = 1, dfs2(S);
  int ans = solve(S);
  if (ma[S] - 1 > 0) ans++;
  printf("%d\n", ans);
  return 0;
}