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>
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.ArrayDeque;
import java.util.Comparator;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author prakharjain
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        FLeafSets solver = new FLeafSets();
        solver.solve(1, in, out);
        out.close();
    }

    static class FLeafSets {
        List[] g;
        int[] dp;
        int k;
        int ans = 0;

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt();

            k = in.nextInt();

            g = new List[n];

            in.readUndirectedGraph(g, n, n - 1, 1);

            int root = -1;
            for (int i = 0; i < n; i++) {
                if (g[i].size() > 1) {
                    root = i;
                    break;
                }
            }

            dp = new int[n];
            postOrderTraversal(g, root, n);
            ans++;

            out.println(ans);
        }

        void postOrderTraversal(List[] g, int root, int n) {
            ArrayDeque<Integer> stack = new ArrayDeque<>();

            stack.addLast(root);

            boolean[] vis = new boolean[n];

            vis[root] = true;

            ArrayDeque<Integer> stack2 = new ArrayDeque<>();

            while (!stack.isEmpty()) {
                int pe = stack.removeLast();

                stack2.addLast(pe);

                for (int i = 0; i < g[pe].size(); i++) {
                    int v = (int) g[pe].get(i);

                    if (!vis[v]) {
                        stack.addLast(v);
                        vis[v] = true;
                    }
                }
            }

            vis = new boolean[n];

            //int[] la = new int[n];

            o:
            while (!stack2.isEmpty()) {
                int u = stack2.removeLast();
                vis[u] = true;

                if (g[u].size() == 1) {
                    continue;
                }

                //List<Integer> l = new ArrayList<>();

                int cn = g[u].size() - 1;
                if (u == root)
                    cn++;
                Integer[] la = new Integer[cn];
                int j = 0;
                for (int i = 0; i < g[u].size(); i++) {
                    int v = (int) g[u].get(i);

                    if (vis[v]) {
                        //Do operations requiring children values
                        la[j] = dp[v] + 1;
                        j++;
                    }
                }

                //Do other operations required for this node

                Arrays.sort(la, 0, cn, Comparator.reverseOrder());

                for (int i = 0; i < cn - 1; i++) {
                    if (la[i] + la[i + 1] > k) {
                        ans++;
                    } else {
                        dp[u] = la[i];
                        continue o;
                    }
                }

                dp[u] = la[cn - 1];
            }
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public void readUndirectedGraph(List[] g, int numOfVertices, int numOfEdges, int offset) {
            for (int i = 0; i < numOfVertices; i++) {
                g[i] = new ArrayList();
            }

            for (int i = 0; i < numOfEdges; i++) {
                int u = nextInt() - offset;
                int v = nextInt() - offset;

                g[u].add(v);
                g[v].add(u);
            }
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void close() {
            writer.close();
        }

        public void println(int i) {
            writer.println(i);
        }

    }
}

