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.PrintWriter;
import java.util.Arrays;
import java.util.Vector;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.Collections;
import java.util.Stack;
import java.util.ArrayList;
import java.io.InputStream;

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

    static class TaskF {
        ArrayList<Integer>[] adj;
        ArrayList<Integer>[] depths;
        int[] father;
        boolean[] leaves;
        int ans;
        int k;
        Stack<Integer> st = new Stack<>();

        void dfs(int root) {
            st.add(root);
            while (st.isEmpty() == false) {
                int node = st.peek();
                if (adj[node].isEmpty() == false) {
                    int child = adj[node].get(adj[node].size() - 1);
                    adj[node].remove(adj[node].size() - 1);
                    if (father[node] == child) continue;
                    if (father[child] == -1) father[child] = node;
                    st.push(child);
                } else {
                    st.pop();
                    if (leaves[node] == true) {
                        depths[father[node]].add(1);
                    } else if (depths[node].isEmpty() == false) {
                        Collections.sort(depths[node]);
                        int newDepth = depths[node].get(0) + 1;
                        for (int i = depths[node].size() - 1; i > 0; i--) {
                            if (depths[node].get(i) + depths[node].get(i - 1) > k) ans++;
                            else {
                                newDepth = depths[node].get(i) + 1;
                                break;
                            }
                        }
                        if (newDepth <= k) {
                            if (node == root) {
                                if (depths[node].isEmpty() == false)
                                    ans++;
                            } else {
                                depths[father[node]].add(newDepth);
                            }
                        } else
                            ans++;
                    }
                }
            }
        }

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            k = in.nextInt();
            adj = new ArrayList[n];
            for (int i = 0; i < n; i++) {
                adj[i] = new ArrayList<>();
            }
            int root = -1;
            for (int i = 0; i < n - 1; i++) {
                int a = in.nextInt() - 1;
                int b = in.nextInt() - 1;
                adj[a].add(b);
                adj[b].add(a);
                if (root == -1 && adj[a].size() > 1) root = a;
                if (root == -1 && adj[b].size() > 1) root = b;
            }
            leaves = new boolean[n];
            for (int i = 0; i < n; i++) {
                if (adj[i].size() == 1) leaves[i] = true;
            }
            father = new int[n];
            Arrays.fill(father, -1);
            depths = new ArrayList[n];
            for (int i = 0; i < n; i++) {
                depths[i] = new ArrayList<>();
            }
            ans = 0;
            dfs(root);
            //int fromRoot = rec(root, -1);
            //if(fromRoot != -1) ans ++;
            out.println(ans);
        }

    }

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

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

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

        private 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 (isWhitespace(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 (!isWhitespace(c));
            return res * sgn;
        }

    }
}

