- 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 vertices and edges, find the size of its minimum vertex cover.
Input
The first line contains one integer, . Next lines each contain two integers, and meaning that there is an edge between vertices and . The graph is connected.
Output
Output the size of the minimum vertex cover.
Constraints
- ,
Examples
Input:
4 1 2 2 3 3 4 2 4 1 3
Output:
2
We can choose as the vertex cover.