Triumphal Arch

No attempts yetTime limit1sMemory limit128 MB

Problem

Byteasar, the king of Byteotia, is returning home after a victorious battle. Byteotia has nn towns connected by exactly n1n-1 roads, and every town is reachable from every other town by a unique route made of one or more direct roads. In other words, the road network forms a tree.

The king has just entered the capital, where a triumphal arch, the gate a victorious king rides through, already stands. Delighted by the warm welcome, Byteasar plans a triumphal procession that visits every town of Byteotia, starting from the capital he is in now.

The other towns are not ready yet: their arches have not even been started. The king's trusted advisor will handle it by hiring some construction crews. Each crew can build one arch per day, in any town. Nobody knows the order in which the king will visit the towns; the only certainty is that each day the king moves from his current town to a neighboring one. The king may visit any town any number of times, but a single arch in each town is enough.

The advisor pays every crew the same flat fee, no matter how many arches it builds. He must guarantee that each town already has an arch by the time the king first arrives there, while hiring as few crews as possible. Help him determine the minimum number of crews needed.

Input

The first line contains a single integer nn (1n300,0001 \le n \le 300{,}000), the number of towns in Byteotia. The towns are numbered from 11 to nn, and town 11 is the capital.

Each of the next n1n-1 lines contains two integers aa and bb (1a,bn1 \le a, b \le n) separated by a space, meaning that towns aa and bb are directly connected by a two-way road.

Output

Print a single integer: the minimum number of crews the advisor needs to hire.

Hint

On the first day, arches must be built in towns 22, 33, and 44. On the second day, they should be built in towns 55, 66, and 77.