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.*;
import java.util.*;

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

	public void run() {
		FastScanner fs = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		System.err.println("Go!");

		int n = fs.nextInt(), k = fs.nextInt();
		int[] deg = new int[n];
		int[] us = new int[n-1], vs = new int[n-1];
		for(int i = 0; i < n-1; i++) {
			int u = fs.nextInt()-1;
			int v = fs.nextInt()-1;
			us[i] = u; vs[i] = v;
			deg[u]++; deg[v]++;
		}
		int[][] adj = new int[n][];
		int rt = 0;
		for(int i = 0; i < n; i++) {
			if(deg[i] > 1) {
				rt = i;
				break;
			}
		}
		for(int i = 0; i < n; i++) adj[i] = new int[deg[i]];
		for(int i = 0; i < n-1; i++) {
			int u = us[i], v = vs[i];
			adj[u][--deg[u]] = v;
			adj[v][--deg[v]] = u;
		}
		int[] queue = new int[n];
		int tail = 0;
		int[] par = new int[n];
		par[rt] = rt;
		queue[tail++] = rt;
		int[] order = new int[n];
		for(int i = 0; i < tail; i++) {
			int u = queue[i];
			order[i] = u;
			for(int v : adj[u]) if(v != par[u]) {
				par[v] = u;
				queue[tail++] = v;
			}
		}
		int[] subSize = new int[n];
		for(int i = n-1; i >= 0; i--) {
			int u = order[i];
			for(int v : adj[u]) if(v != par[u]) {
				subSize[u] += subSize[v];
			}
			subSize[u]++;
		}
		
		
		int res = 0;
		//biggest[i] is the biggest depth of the smallest set that encloses
		//the subtree of node i. This ignores any sets that would definitely
		//be too big to pair with anyone else.
		int[] biggest = new int[n];
		for(int i = n-1; i >= 0; i--) {
			int u = order[i];
			if(subSize[u] == 1) {
				biggest[u] = 1;
				continue;
			}
			int size = u == rt ? adj[u].length : adj[u].length - 1;
			int[] kids = new int[size];
			int ptr = 0;
			for(int j = 0; j < adj[u].length; j++) {
				int v = adj[u][j];
				if(v == par[u]) continue;
				kids[ptr++] = biggest[v];
			}

			//sort all the sets of my kids
			Arrays.sort(kids);
			int best = 0;
			for(int j = ptr-1; j > 0; j--) {
				int size1 = kids[j];
				int size2 = kids[j-1];
				if(size1 + size2 <= k) {
					//these 2 kids can merge together!
					//that means every smaller kid could also
					//merge with this guy
					best = j;
					break;
				}
				
				//alright so if you can't merge with the guy right before
				//you why would I ever try and use you to merge with people
				//in different subtrees? You're too big. So just separate
				//him now and increment the answer.
				res++;
			}
			
			//so this guy at index best will enclose every other
			//set in my subtree that has a smaller depth and he'll 
			//be the representative for merging with other sets in later subtrees.
			biggest[u] = kids[best] + 1;
		}
		
		//also we never counted the biggest set of the root's subtree so + 1
		out.println(++res);
		out.close();
	}

	class FastScanner {
		public int BS = 1<<16;
		public char NC = (char)0;
		byte[] buf = new byte[BS];
		int bId = 0, size = 0;
		char c = NC;
		double num = 1;
		BufferedInputStream in;

		public FastScanner() {
			in = new BufferedInputStream(System.in, BS);
		}

		public FastScanner(String s) throws FileNotFoundException {
			in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
		}

		public char nextChar(){
			while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}                
				if(size==-1)return NC;
				bId=0;
			}
			return (char)buf[bId++];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			num=1;
			boolean neg = false;
			if(c==NC)c=nextChar();
			for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			}
			long res = 0;
			for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			}
			return neg?-res:res;
		}

		public double nextDouble() {
			double cur = nextLong();
			return c!='.' ? cur:cur+nextLong()/num;
		}

		public String next() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c>32) {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public String nextLine() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c!='\n') {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public boolean hasNext() {
			if(c>32)return true;
			while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			}
		}

		public int[] nextIntArray(int n) {
			int[] res = new int[n];
			for(int i = 0; i < n; i++) res[i] = nextInt();
			return res;
		}

	}

}