The undirected unweighted graph with one selected vertex is given. Find the number of vertices in the connected component where the selected vertex (including the selected vertex).
The first line contains the number of vertices and the selected vertex . In the next lines given integers — the adjacency matrix of a graph, where means the absence of an edge, and means the presence of an edge. It is guaranteed that the main diagonal of the matrix contains zeros.
Print the desired number of vertices.