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

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

	int n, k, ptr;
	int[][] adj;
	int[] sets;
	boolean[] leaf;

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

		n = fs.nextInt(); k = fs.nextInt();
		sets = new int[n]; ptr = 0;
		leaf = new boolean[n];
		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]++;
		}
		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;
			}
		}
//		System.out.println(Arrays.toString(order));
		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;
//		System.out.println(Arrays.toString(subSize));
		int[] biggest = new int[n];
		for(int i = n-1; i >= 0; i--) {
			int u = order[i];
//			System.out.println("Solving " + (u + 1) + " " + Arrays.toString(adj[u]));
			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;
//				System.out.printf("%d -> %d has %s\n", u+1, v+1, biggest[v]);
				kids[ptr++] = biggest[v];
			}
			//sort all the sets of my kids
			Arrays.sort(kids);
			//let's find the pairs
			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;
				}
				res++;
			}
			//so my biggest working depth value is the guy at best + 1
//			System.out.printf("For %d best is %d\n", u+1, kids[best] + 1);
			biggest[u] = kids[best] + 1;
		}
		
		out.println(++res);
		out.close();
	}
	
	TreeMap<Integer, Integer> dfs(int u, int p, int dep) {
		TreeMap<Integer, Integer>  res = new TreeMap<>();
		int see = 0;
		for(int v : adj[u]) if(v != p) {
			see++;
			TreeMap<Integer, Integer> get = dfs(v, u, dep + 1);
			TreeMap<Integer, Integer>  small, big;
			if(get.size() <= res.size()) {
				small = get;
				big = res;
			}
			else {
				big = get;
				small = res;
			}
			while(!small.isEmpty()) {
				int it = small.lastKey() - dep;
				int him = big.firstKey() - dep;
				if(it + him <= k) {
					if(it > him) {
						delete(big, him + dep);
						add(big, it + dep);
					}
				}
				else {
					add(big, it + dep);
				}
				delete(small, small.lastKey());
			}
			small = null;
			res = big;
		}
		
		if(see == 0) {
			add(res, dep);
			return res;
		}
		
		return res;
	}
	
	
	private void delete(TreeMap<Integer, Integer> big, int i) {
		int nf = big.get(i)-1;
		if(nf == 0) big.remove(i);
		else big.put(i, nf);
	}
	

	private void add(TreeMap<Integer, Integer> res, int dep) {
		if(!res.containsKey(dep)) {
			res.put(dep, 1);
		}
		else {
			res.put(dep, res.get(dep)+1);
		}
	}


	class MultiSet {
		TreeMap<Integer, Integer> map;
		int size = 0;
		MultiSet() {
			map = new TreeMap<>();
		}
		void add(int v) {
			size++;
			if(!map.containsKey(v)) {
				map.put(v, 01);
			}
			else {
				map.put(v, map.get(v)+1);
			}
		}
		int first() { return map.firstKey(); } 
		boolean isEmpty() { return map.isEmpty(); }
		void delete(int v) {
			size--;
			int fr = map.get(v);
			if(fr == 1) {
				map.remove(v);
			}
			else {
				map.put(v, fr-1);
			}
		}
		int size() {
			return size;
		}
		int last() {
			return map.lastKey();
		}
		int pollLast() {
			int ret = map.lastKey();
			delete(ret);
			return ret;
		}
		public String toString() {
			return map.toString();
		}
	}

	void sort (int[] a) {
		int n = a.length;
		for(int i = 0; i < 50; i++) {
			Random r = new Random();
			int x = r.nextInt(n), y = r.nextInt(n);
			int temp = a[x];
			a[x] = a[y];
			a[y] = temp;
		}
		Arrays.sort(a);
	}

	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;
		}

	}

}