Even Forest

아직 제출이 없습니다시간 제한3초메모리 제한512 MB

문제

An undirected tree is called even if there is no simple path of odd length connecting two of its leaves. In particular, a tree with just one vertex is considered even.

You are given an undirected tree GG with vertices numbered from 11 to nn. A graph obtained by removing some (possibly none) of the edges of GG is called a forest: it consists of one or more disjoint trees. Determine the minimum possible number kk such that we can remove kk edges of GG in such a way that the resulting forest consists only of even trees.

입력

The first line contains one integer nn (1n1061 \le n \le 10^6).

Each of the next n1n - 1 lines contains two integers u_iu\_i and v_iv\_i (1u_i,v_in1 \le u\_i, v\_i \le n) denoting an edge connecting vertex u_iu\_i and vertex v_iv\_i.

The graph is guaranteed to be a tree.

출력

Output the minimum number of edges kk such that we can remove kk edges of GG in such a way that each tree in the resulting forest is even.