# Connected components

Execution time limit is 1 second

Runtime memory usage limit is 128 megabytes

The undirected unweighted graph is given. Find the number of its connected components.

## Input

The first line contains the number of vertices $n(n≤100)$ in the graph. Then, in $n$ lines, an $n$ by $n$ matrix is given — the adjacency matrix of the graph. In the $i$-th row, at the $j$-th position, there is a $1$ if vertices $i$ and $j$ are connected by an edge, and $0$ if there is no edge between them. The main diagonal of the matrix contains zeroes. The matrix is symmetric with respect to the main diagonal.

## Output

Print the number of connected components in a graph.

## Examples

Input #1

Answer #1

Submissions 7K

Acceptance rate 65%