URI Online Judge | 1715

Handball

By Ricardo Anido BR Brazil

Timelimit: 1

Frustrated and disappointed with the results of its football team, the Super Brazilian Club (SBC) decided to invest in the handball team. In order to better rate the players, the coaches would like to analyse their regularity. Specifically, they are interested in knowing how many players scored goals in all matches.

As the data volume is very big, they would like to have a computer program to do this counting.

Input

The input contains several test cases. The first line of a test case contains two integers N and M (1N100 and 1M100) indicating, respectively, the number of players and the number of matches. Each one of the next N lines describes the performance of one player: the i-th line contains M integers Xj (0Xj100, for 1jM ), giving the number of goals that the i-th player scored in each match.

Output

For each test case in the input your program must output one line, containing one integer, the number of players that scored goals in all matches!

Sample Input Sample Output

5 3

0 0 0

1 0 5

0 0 0

0 1 2

1 1 0

0