Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/matritsa-nol-qatorlar-soni

Number of zero rows

Easy 1000 ms 64 MB 23%
Share

A matrix of size $n \times m$ is given. How many of its rows consist only of zeros ($0$)?

A matrix with the rows made entirely of zeros highlighted

Input

The first line contains two positive integers $n$ and $m$.
Each of the next $n$ lines contains $m$ integers — the matrix.

Output

One integer — the number of zero rows.

Note

$1 \le n, m \le 100$
$-1000 \le a_{i,j} \le 1000$

Examples

Input #1
4 3
0 0 0
1 0 2
0 0 0
0 -5 0
Output #1
2
Input #2
2 2
1 2
3 4
Output #2
0

Sign in to submit a solution

Signing up is free and takes a minute.