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.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Stack;

public class Main {

    PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out));
    private static boolean debug = false;

    private String nextString() {
        StringBuilder sb = new StringBuilder();
        try {
            char c = (char) System.in.read();
            while (c == ' ' || c == '\n' || c == '\t') {
                c = (char) System.in.read();
            }
            do {
                sb.append(c);
                c = (char) System.in.read();
            } while (c != ' ' && c != '\n' && c != '\t');
        } catch (IOException e) {
            e.printStackTrace();
        }
        return sb.toString();
    }

    private int nextInt() {
        int r = 0;
        boolean f = false;
        try {
            int c = System.in.read();
            while (c < '0' || c > '9') {
                if (c == '-') {
                    f = true;
                }
                c = System.in.read();
            }
            while (c >= '0' && c <= '9') {
                r = r * 10 + c - '0';
                c = System.in.read();
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
        if (f) {
            r *= -1;
        }
        return r;
    }

    private long nextLong() {
        long r = 0;
        boolean f = false;
        try {
            int c = System.in.read();
            while (c < '0' || c > '9') {
                if (c == '-') {
                    f = true;
                }
                c = System.in.read();
            }
            while (c >= '0' && c <= '9') {
                r = r * 10 + c - '0';
                c = System.in.read();
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
        if (f) {
            r *= -1;
        }
        return r;
    }

    private void println(String s) {
        out.write(s);
        out.write('\n');
        out.flush();
    }

    private void println(long s) {
        println(String.valueOf(s));
    }

    public class AVL<T> {

        private Node<T> root = null;
        private final Comparator<T> comparator;

        public AVL(Comparator<T> comparator) {
            this.comparator = comparator;
        }

        public void insert(T v) {
            if (root == null) {
                root = new Node<>(v, this.comparator);
            } else {
                root = root.insert(v);
            }
        }

        public int gt(T v) {
            return root == null ? 0 : root.gt(v);
        }

        public class Node<T> {
            T v;
            Comparator<T> comparator;
            int size = 1;
            int dep = 1;
            Node<T> lc = null;
            Node<T> rc = null;

            public Node(T v, Comparator<T> comparator) {
                this.v = v;
                this.comparator = comparator;
            }

            private int getDep(Node node) {
                return node == null ? 0 : node.dep;
            }

            private int getSize(Node node) {
                return node == null ? 0 : node.size;
            }

            public Node<T> insert(T v) {
                Node<T> rt = this;
                if (comparator.compare(v, this.v) >= 0) {
                    if (this.rc == null) {
                        this.rc = new Node<>(v, this.comparator);
                    } else {
                        this.rc = this.rc.insert(v);
                    }
                } else {
                    if (this.lc == null) {
                        this.lc = new Node<>(v, this.comparator);
                    } else {
                        this.lc = this.lc.insert(v);
                    }
                }
                if (getDep(this.lc) > getDep(this.rc) + 1) {
                    Node<T> lc = this.lc;
                    this.lc = lc.rc;
                    lc.rc = this;
                    this.update();
                    lc.update();
                    rt = lc;
                } else if (getDep(this.rc) > getDep(this.lc) + 1) {
                    Node<T> rc = this.rc;
                    this.rc = rc.lc;
                    rc.lc = this;
                    this.update();
                    rc.update();
                    rt = rc;
                } else {
                    this.update();
                }
                return rt;
            }

            private void update() {
                this.dep = Math.max(getDep(this.rc), getDep(this.lc)) + 1;
                this.size = getSize(this.rc) + getSize(this.lc) + 1;
            }

            public int gt(T v) {
                if (comparator.compare(v, this.v) >= 0) {
                    return this.rc == null ? 0 : this.rc.gt(v);
                } else {
                    return getSize(this.rc) + 1 + (this.lc == null ? 0 : this.lc.gt(v));
                }
            }
        }

    }

    public static void main(String[] args) {
        new Main().resolve();
    }

    int ans = 0;
    List<List<Integer>> es = new ArrayList<>();

    private void resolve() {
        int n = nextInt();
        int m = nextInt();
        for (int i = 0; i < n; i++) {
            es.add(new ArrayList<>());
        }
        for (int i = 0; i < n - 1; i++) {
            int a = nextInt() - 1;
            int b = nextInt() - 1;
            es.get(a).add(b);
            es.get(b).add(a);
        }
        loop(0, -1, m);
        println(ans);
    }

    private void loop(int k, int f, int l) {
        Stack<List<Object>> stk = new Stack<>();
        int a = -1;
        int b = -1;
        int id = 0;
        while (true) {
            while (id < es.get(k).size() && es.get(k).get(id) == f) {
                id++;
            }
            if (id == es.get(k).size()) {
                int rt = -1;
                if (a == -1 && b == -1) {
                    if (f == -1 && es.get(k).size() == 1) {
                        ans++;
                    }
                    rt = es.get(k).size() == 1 ? 1 : -1;
                } else if (a == -1) {
                    rt = b + 1;
                    if (f == -1) {
                        ans++;
                    }
                } else if (b == -1) {
                    if (a == l || f == -1) {
                        ans++;
                    } else {
                        rt = a + 1;
                    }
                } else {
                    if (a + b > l) {
                        ans++;
                        rt = b + 1;
                    } else {
                        rt = a + 1;
                    }
                    if (f == -1) {
                        ans++;
                    }
                }
                if (stk.empty()) {
                    return;
                }
                List<Object> obj = stk.pop();
                a = (int) obj.get(0);
                id = ((int) obj.get(1)) + 1;
                k = (int) obj.get(2);
                f = (int) obj.get(3);
                b = (int) obj.get(4);
                if (rt != -1) {
                    if (rt * 2 > l) {
                        if (a == -1) {
                            a = rt;
                        } else {
                            a = Math.min(a, rt);
                            ans++;
                        }
                    } else {
                        if (b == -1) {
                            b = rt;
                        } else {
                            b = Math.max(b, rt);
                        }
                    }
                }
            } else {
                List<Object> obj = new ArrayList<>();
                obj.add(a);
                obj.add(id);
                obj.add(k);
                obj.add(f);
                obj.add(b);
                stk.push(obj);
                a = -1;
                b = -1;
                f = k;
                k = es.get(k).get(id);
                id = 0;
            }
        }
    }

    private int dfs(int k, int f, int l) {
        List<Integer> tmp = new ArrayList<>();
        for (int t : es.get(k)) {
            if (t != f) {
                int r = dfs(t, k, l);
                if (r != -1) {
                    tmp.add(-(r + 1));
                }
            }
        }
        Collections.sort(tmp);
        if (tmp.isEmpty()) {
            if (f == -1 && es.get(k).size() == 1) {
                ans++;
            }
            return es.get(k).size() == 1 ? 0 : -1;
        }
        int ind = 0;
        while (ind + 1 < tmp.size() && -tmp.get(ind) - tmp.get(ind + 1) > l) {
            ans++;
            ind++;
        }
        if (f == -1 || tmp.get(ind) == -l) {
            ans++;
        }
        return tmp.get(ind) == -l ? -1 : -tmp.get(ind);
    }
}
