Given the adjacency matrix of an undirected graph with n vertices,
determine and print the number of isolated vertices.
A vertex is isolated if its degree is 0, meaning it is not an endpoint
of any edge (the corresponding row of the adjacency matrix contains
only 0 values).
Input:
The first line contains the natural number n. The following n lines each
contain n binary values, representing the adjacency matrix.
- 1 <= n <= 50
- the matrix is symmetric with 0 on the main diagonal
Output:
The program prints to standard output a single non-negative integer: the number of isolated
vertices in the graph.
Example:
Input:
5
0 1 1 0 0
1 0 0 1 0
1 0 0 0 1
0 1 0 0 0
0 0 1 0 0
Output:
0