Number of hanging vertices 2
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Given a simple undirected unweighted graph. Count the number of hanging vertices in it. The vertex is hanging, if its degree is 1.
Input
The first line contains two numbers n and m (1 ≤ n, m ≤ 1000) - the number of vertices and the number of edges. Next m lines contain a list of edges.
Output
Print the number of hanging vertices in a graph.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 2K
Acceptance rate 64%