eolymp
bolt
Try our new interface for solving problems
Problems

Space Travel

Space Travel

\includegraphics{https://static.e-olymp.com/content/00/0059126fa1d15c86798d3216b3049a83a934559c.jpg} 3141 year. Space travel using subspaces teleported tunnels are no longer a novelty. However, not all Terran Federation Megagallaktick network of tunnels is well developed. In a stellar system \textbf{n} planets connected by tunnels, so that on each planet you can get to every single way, moving only through the tunnels. At the same tunnel to navigate through hyperspace is allowed in both directions. Installed on every planet in the substation, which provides all the tunnels that this planet is connected to the other. If this stops working substation (for example, due to a failure or due to the fact that its close on preventive maintenance), all the tunnels, one end of which is this planet, no longer work. As a consequence, for some other planet may disappear opportunity to get from one to another. We call the world, sub-stations which have described the property, \textit{important}. We explain more formally. Planet \textbf{u} is \textit{important}, if, after the tunnels, one end of which is \textbf{u}, not work, there will be at least two such planets \textbf{v} and \textbf{w}, which can not be reached from \textbf{v} to \textbf{w} in the remaining tunnels. Scheme is given hyperspace tunnels in this stellar system. Your task - to write a program that calculates the number of major planets in the star system. \InputFile The first line contains \textbf{n} - number (\textbf{1} ≤ \textbf{n} ≤ \textbf{100}) of the planets in the star system. This is followed by (\textbf{n-1}) rows, each of which describes a tunnel and contains two numbers: \textbf{u} and \textbf{v} - number of planets, the corresponding tunnel connected (\textbf{1} ≤ \textbf{u}, \textbf{v} ≤ \textbf{n}, \textbf{u} ≠ \textbf{v}). Planets are labeled by natural numbers from \textbf{1} to \textbf{n}. \OutputFile In the output file output response to the problem - the number of major planets.
Time limit 1 second
Memory limit 64 MiB
Input example #1
4
1 2
1 3
1 4
Output example #1
1