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 MOD = 1e9 + 7;
long long PRIME = 999727999;
long long PRIME2 = 999999937;
long long INF = LLONG_MAX / 4;
template <class F1, class F2>
ostream& operator<<(ostream& os, const pair<F1, F2>& p) {
  return os << p.first << ' ' << p.second;
}
template <class F1, class F2>
istream& operator>>(istream& is, pair<F1, F2>& p) {
  return is >> p.first >> p.second;
}
template <class F>
ostream& operator<<(ostream& os, const std::vector<F>& v) {
  for (int i = 0; i < (int)(v.size()); i++) os << v[i] << " ";
  return os;
}
template <class F>
istream& operator>>(istream& is, std::vector<F>& v) {
  for (int i = 0; i < (int)(v.size()); i++) is >> v[i];
  return is;
}
vector<string> split(const std::string& s, char delim) {
  vector<string> e;
  stringstream ss(s);
  string item;
  while (getline(ss, item, delim)) e.push_back(item);
  return e;
}
long long Pow(long long a, long long b, long long Mo) {
  long long ans = 1;
  for (; b; b >>= 1, a = a * a % Mo)
    if (b & 1) ans = ans * a % Mo;
  return ans;
}
long long _div(long long a, long long b) {
  return (a * Pow(b, MOD - 2, MOD)) % MOD;
}
long long nCr(long long n, long long r) {
  static long long MAXF = 1e6;
  static std::vector<long long> fact(MAXF, 1);
  for (int i = 1; i < MAXF; ++i) fact[i] = (fact[i - 1] * i) % MOD;
  MAXF = 0;
  return (fact[n] * Pow((fact[r] * fact[n - r]) % MOD, MOD - 2, MOD)) % MOD;
}
vector<int> Zfunc(string& s) {
  int n = s.length();
  vector<int> z(n, 0);
  for (int i = 1, l = 0, r = 0; i < n; i++) {
    if (i <= r) z[i] = min(z[i - l], r - i + 1);
    while (i + z[i] < n && s[i + z[i]] == s[z[i]]) z[i]++;
    if (r < i + z[i] - 1) l = i, r = i + z[i] - 1;
  }
  return z;
}
int MX = 1e9;
class SegTree {
 public:
  std::vector<pair<int, int> > data;
  int size;
  pair<int, int> ZERO = make_pair(MX, -1);
  pair<int, int> merge(pair<int, int> l, pair<int, int> r) { return min(l, r); }
  void build(int s) {
    size = 1;
    while (size < s) size <<= 1;
    data = std::vector<pair<int, int> >(2 * size, ZERO);
    for (int i = 0; i < s; ++i) data[size + i] = make_pair(0, i);
    for (int i = size - 1; i > 0; --i)
      data[i] = merge(data[i << 1], data[i << 1 | 1]);
  }
  void change(int index, pair<int, int> value) {
    index += size;
    data[index] = value;
    for (; index > 1; index >>= 1) {
      int index2 = (index >> 1) << 1;
      data[index >> 1] = merge(data[index2], data[index2 | 1]);
    }
  }
  pair<int, int> query(int a, int b) {
    pair<int, int> s = ZERO;
    for (int l = a + size, u = b + size; l < u; l >>= 1, u >>= 1) {
      if (l & 1) s = merge(s, data[l++]);
      if (u & 1) s = merge(s, data[--u]);
    }
    return s;
  }
};
long long K;
SegTree st;
std::vector<std::vector<int> > G;
std::vector<multiset<int> > v;
std::vector<int> base;
int counter = 0;
int dfs(int s, int p) {
  int start = counter;
  int myid = s;
  std::vector<int> ids;
  for (auto x : G[s])
    if (x != p) {
      int id = dfs(x, s);
      ids.push_back(id);
      if (myid == s || v[id].size() > v[myid].size()) myid = id;
    }
  counter++;
  int eend = counter;
  for (auto& x : ids) {
    if (x != myid) {
      for (auto y : v[x]) v[myid].insert(y + base[x] - base[myid]);
      v[x].clear();
    }
  }
  base[myid]++;
  while (v[myid].size() > 1) {
    int m1 = *v[myid].begin();
    v[myid].erase(v[myid].begin());
    int m2 = *v[myid].begin();
    if (m1 + m2 + 2 * base[myid] <= K) {
      ;
    } else {
      v[myid].insert(m1);
      break;
    }
  }
  return myid;
}
int main(int argc, char const* argv[]) {
  std::ios::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n >> K;
  G.resize(n);
  for (int i = 0; i < (int)(n - 1); i++) {
    int a, b;
    cin >> a >> b;
    a--;
    b--;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  int root = 0;
  base.resize(n, 0);
  v.resize(n);
  for (int i = 0; i < (int)(n); i++)
    if (G[i].size() > 1) {
      root = i;
      break;
    }
  for (int i = 0; i < (int)(n); i++)
    if (G[i].size() == 1) {
      v[i].insert(0);
      base[i] = -1;
    }
  int c = 0;
  for (int i = 0; i < (int)(n); i++)
    if (v[i].size() > 0) c++;
  c = dfs(root, -1);
  cout << v[c].size();
  return 0;
}