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 std::vector;
const int inf = 1e8 + 7;
struct Element {
  int len;
  int cnt;
  Element() {}
  Element(int len, int cnt) : len(len), cnt(cnt) {}
};
vector<int> g[1000005];
int vis[1000005];
Element f[1000005][2];
int sizef[10000005];
int isBetter(Element& u, Element& v) {
  if (u.cnt <= v.cnt - 2)
    return 1;
  else if (u.cnt <= v.cnt && u.len <= v.len)
    return 1;
  else
    return 0;
}
Element incElement(Element& u, int k) {
  if (u.len != 0) {
    if (u.len == k)
      return Element(0, u.cnt + 1);
    else
      return Element(u.len + 1, u.cnt);
  } else
    return u;
}
int max(int a, int b) { return a > b ? a : b; }
void update(Element next[], Element& u) {
  int good = 0, bad = 0;
  for (int i = 0; i < 2; i++) {
    if (isBetter(next[i], u)) {
      bad = 1;
    } else {
      good = 1;
      next[i] = u;
    }
  }
  if (!good && !bad) {
    next[1] = u;
  }
}
void dp(int u, int k) {
  vis[u] = 1;
  int cnt = 0;
  f[u][0] = f[u][1] = Element(0, 0);
  for (int v : g[u]) {
    if (vis[v] == 0) {
      dp(v, k);
      cnt++;
      Element next[2] = {Element(inf, inf), Element(inf, inf)};
      for (int i = 0; i < 2; i++) {
        for (int j = 0; j < 2; j++) {
          Element ue = f[u][i], ve = f[v][j];
          Element nve = incElement(ve, k);
          int need = ue.cnt + (ue.len != 0) + ve.cnt + (ve.len != 0);
          Element offer = Element(0, need);
          update(next, offer);
          need = ue.cnt + (ue.len != 0) + nve.cnt;
          offer = Element(nve.len, need);
          update(next, offer);
          need = ue.cnt + ve.cnt + (ve.len != 0);
          offer = Element(ue.len, need);
          update(next, offer);
          int totalLen = max(ue.len - 1, 0) + max(nve.len - 1, 0);
          if (totalLen <= k) {
            need = ue.cnt + nve.cnt;
            offer = Element(max(ue.len, nve.len), need);
            update(next, offer);
          }
        }
      }
      f[u][0] = next[0];
      f[u][1] = next[1];
    }
  }
  if (!cnt) {
    f[u][0] = Element(0, 1);
    f[u][1] = Element(1, 0);
  }
}
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n - 1; i++) {
    int u, v;
    scanf("%d%d", &u, &v);
    g[u].push_back(v);
    g[v].push_back(u);
  }
  int s = 0;
  for (int i = 1; i <= n; i++) {
    if (g[i].size() != 1) {
      s = i;
      break;
    }
  }
  dp(s, k);
  int ans = 1e8 + 7;
  for (int i = 0; i < 2; i++) {
    int offer = f[s][i].cnt + (f[s][i].len != 0);
    if (ans > offer) ans = offer;
  }
  printf("%d\n", ans);
  return 0;
}