Points
题号:NC202866
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Jack and Rose are playing games after working out so many difficult problems. They together drew a “Haizi” tree to show their collaboration. “Haizi” tree is the same as the tree defined in graph theory.

Now Jack would like to count the number of vertices whose degree is one in this tree. You need to help him with this calculation.

: The degree of a vertex of a graph is the number of edges that are connected with the vertex.

输入描述:

The first line contains an integer  () --- the number of vertices.
The next lines describe the edges of the tree, where the -th line contains two integers x_i, y_i () --- the two vertices that is connected by the -th edge.

输出描述:

Output one integers in one line --- the number of vertices whose degree is one.
示例1

输入

复制
5
1 2
2 3
1 4
4 5

输出

复制
2

说明

As shown in figure below, only the vertex {3} and vertex {5} are connected with only one edge. So there are {2} vertices whose degree is one.