The Zookeeper has bought an orange tree, that has N nodes (1 ≤ N ≤ 100000) and N-1 edges. Each node has exactly 1 orange.
As hedgehogs like to consume oranges, Jamie the evil Hedgehog would like to consume a set of oranges. However, if she consumes oranges form neighbouring vertices, the Zookeeper will notice and arrest her.
Help Jamie find how many oranges she can consume without getting caught!
The first line of input contains 1 integer N
The next N-1 lines of input contains 2 integers a and b, representing an edge from node a to node b.
It is guaranteed that a tree will be formed from the egdes.
Output 1 integer, the number of oranges Jamie can consume
Input:
8
1 2
1 3
1 4
1 5
4 6
4 7
4 8
Output:
6
Subtask | Score |
---|---|
1 | 100 |
2 | 0 |