Get rid of them all#8787

Get rid of them all

1 second
64 megabytes
Easy

Given a tree with vertices, your task is to determine the maximum number of edges that can be removed such that every resulting connected component has an even number of vertices.

Input

The first line contains a single integer (1 \leq n \leq 10^5).

The following n - 1 lines each contain two integers and (1 \leq u, v \leq n), representing an edge between vertices and .

It is guaranteed that the input describes a valid tree.

Output

Print a single integer , which is the maximum number of edges that can be removed to ensure all connected components have an even number of vertices. If it is not possible to achieve this, print .

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Example 3

Loading
Loading

Example 4

Loading
Loading