CSES - KILO 2016 5/5 - VERTEX COVER
  • Time limit: 2.00 s
  • Memory limit: 512 MB

VERTEX COVER is a famous NP-complete problem. In VERTEX COVER you are given a graph and you should choose a minimum size subset of its vertices such that for each edge at least one of its endpoints is in the subset.

Given a connected graph with nn vertices and n+1n + 1 edges, find the size of its minimum vertex cover.

Input

The first line contains one integer, nn. Next n+1n+1 lines each contain two integers, viv_i and uiu_i meaning that there is an edge between vertices viv_i and uiu_i. The graph is connected.

Output

Output the size of the minimum vertex cover.

Constraints

  • 4n1054 \le n \le 10^5
  • 1vi,uin1 \le v_i, u_i \le n, viuiv_i \neq u_i

Examples

Input:

4
1 2
2 3
3 4
2 4
1 3

Output:

2

We can choose {2,3}\{2, 3\} as the vertex cover.