Number of pendant vertices 1#5080

Number of pendant vertices 1

1 second
128 megabytes
Very easy

A simple undirected unweighted graph is given. Find the number of pendant vertices. A vertex is called pendant if its degree is equal to .

Input

The first line contains an integer n~(1 \le n \le 1000) — the number of vertices in the graph. The following lines contain the adjacency matrix.

Output

Print the number of pendant vertices in the graph.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading