Number of hanging vertices 1
Execution time limit is 3 seconds
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 .
Input
The first line contains number . The next lines contain the adjacency matrix.
Output
Print the number of hanging vertices in a graph.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 5K
Acceptance rate 64%