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;
char ibuf[1 << 25], *ih = ibuf;
inline void read(int& x) {
  for (; !isdigit(*ih); ++ih)
    ;
  for (x = 0; isdigit(*ih); x = x * 10 + *ih++ - 48)
    ;
}
const int N = 1000005;
int t[N << 2];
inline int Max(const int& a, const int& b) { return a < b ? b : a; }
int u, v, i, n, k;
int lcnt, dl[N], dep[N], le[N], ri[N], dfn[N], xb, dad[N], ans;
vector<int> e[N];
int g[N], cc[N];
void dfs(int x, int fa) {
  dep[x] = dep[fa] + 1;
  dad[x] = fa;
  int ccnt = 0;
  for (int i = 0; i < e[x].size(); ++i) ccnt += e[x][i] != fa;
  le[x] = lcnt + 1;
  if (e[x].size() == 1) dl[++lcnt] = dep[x];
  for (int i = 0; i < e[x].size(); ++i)
    if (e[x][i] != fa) dfs(e[x][i], x);
  if (ccnt > 1)
    g[x] = x;
  else
    g[x] = fa;
  cc[x] = ccnt;
  ri[x] = lcnt;
  dfn[++xb] = x;
}
inline int gfa(int x) { return g[x] == x ? x : g[x] = gfa(g[x]); }
void build(int i, int l, int r) {
  if (l == r) {
    t[i] = dl[l];
    return;
  }
  int m = (l + r) >> 1;
  build(i << 1, l, m);
  build(i << 1 | 1, m + 1, r);
  t[i] = Max(t[i << 1], t[i << 1 | 1]);
}
int query(int i, int l, int r, int x, int y) {
  if (!t[i] || (l == x && r == y)) return t[i];
  int m = (l + r) >> 1;
  if (x > m)
    return query(i << 1 | 1, m + 1, r, x, y);
  else if (y <= m)
    return query(i << 1, l, m, x, y);
  else
    return Max(query(i << 1, l, m, x, m),
               query(i << 1 | 1, m + 1, r, m + 1, y));
}
void mdy(int i, int l, int r, int x, int y) {
  if (l == x && r == y) {
    t[i] = 0;
    return;
  }
  int m = (l + r) >> 1;
  if (x > m)
    mdy(i << 1 | 1, m + 1, r, x, y);
  else if (y <= m)
    mdy(i << 1, l, m, x, y);
  else
    mdy(i << 1, l, m, x, m), mdy(i << 1 | 1, m + 1, r, m + 1, y);
  t[i] = Max(t[i << 1], t[i << 1 | 1]);
}
vector<pair<int, int> > zz[N];
bool cmpp(const int& x, const int& y) { return dep[x] > dep[y]; }
int main() {
  fread(ibuf, 1, 1 << 25, stdin);
  read(n);
  read(k);
  for (i = 1; i < n; ++i) {
    read(u);
    read(v);
    e[u].push_back(v);
    e[v].push_back(u);
  }
  for (i = 1; i <= n; ++i)
    if (e[i].size() > 1) break;
  dfs(i, 0);
  build(1, 1, lcnt);
  ans = 1;
  sort(dfn + 1, dfn + xb + 1, cmpp);
  for (i = 1; i <= xb; ++i) {
    u = dfn[i];
    if (u == 10) {
      ++u, --u;
    }
    int gg = gfa(dad[u]);
    gg = u;
    if (zz[gg].empty()) {
      int j;
      for (j = 0; j < e[gg].size(); ++j)
        if (e[gg][j] != dad[gg])
          zz[gg].push_back(make_pair(
              query(1, 1, lcnt, le[e[gg][j]], ri[e[gg][j]]), e[gg][j]));
      sort(zz[gg].begin(), zz[gg].end());
      for (; zz[gg].size() > 1;) {
        int l = zz[gg].size() - 1, uu = zz[gg][l].first,
            vv = zz[gg][l - 1].first;
        if (uu + vv - 2 * dep[gg] <= k) break;
        u = zz[gg].back().second;
        mdy(1, 1, lcnt, le[u], ri[u]);
        zz[gg].pop_back();
        ++ans;
      }
    }
  }
  printf("%d\n", ans);
  return 0;
}