From different countries and different universities, too many teams are coming to Bangladesh to participate in the $45^{th}$ Annual ICPC World Finals. The organizer team wanted to provide a suitable contest environment for the participants. So they select a big hall room where they set $N$ rows of PCs and each row has $M$ PCs. One team will use one PC. After completing the seat plan they have some extra seats and want to allow some extra teams.
Though everyone is busy with different types of activities, so for the given configuration of the hall you need to calculate the number of extra teams that can participate in the contest.
The first line will take two integers $N$ and $M$, which denote respectively the total row numbers and PC numbers in each row.
The next $N$ line will take the $M$ character $“1”$ or $“0”$ ($“1”$ means the seat is booked for a team, and $“0”$means the seat is empty).
$(1<=N,M<=1000)$
You have to output an integer — the number of extra teams that can participate in the contest.
Input | Output |
---|---|
5 5 1 1 0 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 0 0 1 1 | 6 |
Be careful about the newline(‘\n’) at the end.