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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.FilterInputStream;
import java.io.BufferedInputStream;
import java.io.InputStream;

/**
 * @author khokharnikunj8
 */

public class Main {
    public static void main(String[] args) {
        new Thread(null, new Runnable() {
            public void run() {
                new Main().solve();
            }
        }, "1", 1 << 28).start();
    }

    void solve() {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        ScanReader in = new ScanReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        FLeafSets solver = new FLeafSets();
        solver.solve(1, in, out);
        out.close();
    }

    static class FLeafSets {
        int[][] G;
        int ans;
        int k;
        int t;

        private int findIt(int node, int p) {
            int[] ar = new int[(node == t ? G[node].length : G[node].length - 1)];
            int tt = 0;
            for (int i : G[node]) {
                if (i == p) continue;
                ar[tt++] = (findIt(i, node));
            }
            Arrays.sort(ar);
            for (int i = 0; i < tt / 2; i++) ar[i] = ar[i] + ar[tt - i - 1] - (ar[tt - i - 1] = ar[i]);
            if (tt == 0) return 1;
            if (tt > 1) {
                int low = 0;
                int high = tt - 2;
                int index = -1;
                while (low <= high) {
                    int mid = (low + high) / 2;
                    if (ar[mid] + ar[mid + 1] <= k) {
                        index = mid;
                        high = mid - 1;
                    } else {
                        low = mid + 1;
                    }
                }
                if (index == -1) {
                    ans += (tt - 1);
                    return ar[tt - 1] + 1;
                }
                ans += index;
                return ar[index] + 1;
            } else {
                return ar[0] + 1;
            }
        }

        public void solve(int testNumber, ScanReader in, PrintWriter out) {
            int n = in.scanInt();
            k = in.scanInt();
            ans = 0;
            int[] from = new int[n - 1];
            int[] to = new int[n - 1];
            for (int i = 0; i < n - 1; i++) {
                from[i] = in.scanInt();
                to[i] = in.scanInt();
            }
            G = CodeHash.packGraph(from, to, n);
            for (int i = 1; i <= n; i++) {
                if (G[i].length > 1) {
                    t = i;
                    findIt(i, -1);
                    break;
                }
            }
            out.println(ans + 1);

        }

    }

    static class ScanReader {
        private byte[] buf = new byte[4 * 1024];
        private int index;
        private BufferedInputStream in;
        private int total;

        public ScanReader(InputStream inputStream) {
            in = new BufferedInputStream(inputStream);
        }

        private int scan() {
            if (index >= total) {
                index = 0;
                try {
                    total = in.read(buf);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                if (total <= 0) return -1;
            }
            return buf[index++];
        }

        public int scanInt() {
            int integer = 0;
            int n = scan();
            while (isWhiteSpace(n)) n = scan();
            int neg = 1;
            if (n == '-') {
                neg = -1;
                n = scan();
            }
            while (!isWhiteSpace(n)) {
                if (n >= '0' && n <= '9') {
                    integer *= 10;
                    integer += n - '0';
                    n = scan();
                }
            }
            return neg * integer;
        }

        private boolean isWhiteSpace(int n) {
            if (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1) return true;
            else return false;
        }

    }

    static class CodeHash {
        public static int[][] packGraph(int[] from, int[] to, int n) {
            int[][] g = new int[n + 1][];
            int p[] = new int[n + 1];
            for (int i : from) p[i]++;
            for (int i : to) p[i]++;
            for (int i = 0; i <= n; i++) g[i] = new int[p[i]];
            for (int i = 0; i < from.length; i++) {
                g[from[i]][--p[from[i]]] = to[i];
                g[to[i]][--p[to[i]]] = from[i];
            }
            return g;
        }

    }
}