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 JAVA):

Solution:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

/**
 * @author Don Li
 */
public class LeafSets {
    
    int n, k;
    int[][] G;
    
    int[] par, dep, ord;
    
    void solve() {
        n = in.nextInt(); k = in.nextInt();
        int[] fr = new int[n - 1], to = new int[n - 1];
        for (int i = 0; i < n - 1; i++) {
            fr[i] = in.nextInt() - 1;
            to[i] = in.nextInt() - 1;
        }
        G = build_graph(n, fr, to);
        
        int root = -1;
        for (int i = 0; i < n; i++) {
            if (G[i].length > 1) {
                root = i;
                break;
            }
        }
        assert root >= 0;
        
        int[][] ret = bfs(G, root);
        par = ret[0]; dep = ret[1]; ord = ret[2];
        
        int ans = 1;
        int[] far = new int[n];
        List<Integer> list = new ArrayList<>();
        for (int i = n - 1; i >= 0; i--) {
            int u = ord[i];
            if (G[u].length == 1) {
                far[u] = dep[u];
                continue;
            }
            list.clear();
            for (int v : G[u]) {
                if (v != par[u]) {
                    list.add(far[v]);
                }
            }
            list.sort(Comparator.reverseOrder());
            int j = 0;
            while (j < list.size()) {
                if (j + 1 >= list.size() || list.get(j) + list.get(j + 1) - 2 * dep[u] <= k) break;
                ans++;
                j++;
            }
            far[u] = list.get(j);
        }
        
        out.println(ans);
    }
    
    int[][] bfs(int[][] G, int root) {
        int n = G.length;
        
        int[] par = new int[n];
        Arrays.fill(par, -1);
        
        int[] dep = new int[n];
        dep[root] = 0;
        
        int[] qu = new int[n];
        qu[0] = root;
        for (int l = 0, r = 1; l < r; l++) {
            int u = qu[l];
            for (int v : G[u]) {
                if (v != par[u]) {
                    qu[r++] = v;
                    par[v] = u;
                    dep[v] = dep[u] + 1;
                }
            }
        }
        
        return new int[][]{par, dep, qu};
    }
    
    int[][] build_graph(int n, int[] from, int[] to) {
        int[][] G = new int[n][];
        int[] cnt = new int[n];
        for (int i = 0; i < from.length; i++) {
            cnt[from[i]]++;
            cnt[to[i]]++;
        }
        for (int i = 0; i < n; i++) G[i] = new int[cnt[i]];
        for (int i = 0; i < from.length; i++) {
            G[from[i]][--cnt[from[i]]] = to[i];
            G[to[i]][--cnt[to[i]]] = from[i];
        }
        return G;
    }
    
    public static void main(String[] args) {
        in = new FastScanner(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(System.out);
        new LeafSets().solve();
        out.close();
    }
    
    static FastScanner in;
    static PrintWriter out;
    
    static class FastScanner {
        BufferedReader in;
        StringTokenizer st;
        
        public FastScanner(BufferedReader in) {
            this.in = in;
        }
        
        public String nextToken() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        
        public int nextInt() {
            return Integer.parseInt(nextToken());
        }
        
        public long nextLong() {
            return Long.parseLong(nextToken());
        }
        
        public double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
}