CF1593E Gardener and Tree

Description

A tree is an undirected connected graph in which there are no cycles. This problem is about non-rooted trees. A leaf of a tree is a vertex that is connected to at most one vertex. The gardener Vitaly grew a tree from $ n $ vertices. He decided to trim the tree. To do this, he performs a number of operations. In one operation, he removes all leaves of the tree. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1593E/e8bbfb1cf94ddaff2bb40dff57cd4675e200ab32.png)Example of a tree.For example, consider the tree shown in the figure above. The figure below shows the result of applying exactly one operation to the tree. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF1593E/9ff09fe31311a6b0efbe94fad6bf0876b5484ab8.png)The result of applying the operation "remove all leaves" to the tree.Note the special cases of the operation: - applying an operation to an empty tree (of $ 0 $ vertices) does not change it; - applying an operation to a tree of one vertex removes this vertex (this vertex is treated as a leaf); - applying an operation to a tree of two vertices removes both vertices (both vertices are treated as leaves). Vitaly applied $ k $ operations sequentially to the tree. How many vertices remain?

Input Format

N/A

Output Format

N/A

Explanation/Hint

The first test case is considered in the statement. The second test case contains a tree of two vertices. $ 200000 $ operations are applied to it. The first one removes all two vertices, the other operations do not change the tree. In the third test case, a tree of three vertices is given. As a result of the first operation, only $ 1 $ vertex remains in it (with the index $ 2 $ ), the second operation makes the tree empty.