Space Travel#1747

Space Travel

1 second
64 megabytes
Very easy

3141 year. Space travel using subspace teleportation tunnels is no longer a novelty. However, not all of the Terran Federation Megagalactic network of tunnels is well developed.

In a stellar system, planets are connected by tunnels, so that from each planet, you can reach every other one by moving only through the tunnels. At the same time, it is allowed to navigate through any tunnel in both directions.

A substation is installed on every planet, which supplies power to all the tunnels that connect this planet to others. If this substation stops working (for example, due to a failure or because it is closed for maintenance), all the tunnels with this planet at one end stop working. As a consequence, it may become impossible for planets to travel between one another. We call a world whose substation has the described property important.

We explain more formally. Planet is important if, after the tunnels incident to stop functioning, there exist at least two planets and such that it is impossible to reach from using the remaining tunnels.

The hyperspace tunnels layout in this stellar system is given. Your task is to write a program that computes the number of important planets in the star system.

Input

The first line contains — the number (1 \leq n \leq 100) of planets in the star system. This is followed by n - 1 rows, each of which describes a tunnel and contains two numbers: and — the labels of the planets connected by the corresponding tunnel (1 \leq u, v \leq n, u \neq v).

Planets are labeled with natural numbers from to .

Output

Output the answer to the problem — the number of important planets.

Examples

Example 1

Loading
Loading