Handball

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 (1 ≤ N ≤ 100 and 1 ≤ M ≤ 100) 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 (0 ≤ Xj ≤ 100, for 1 ≤ j ≤ M), 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 53 000 105 000 012 110 12 5 44237 00010 74706 12332 00000 4 0 9 10 10 01000 12023 10 10 10 1 0 03334 10 10 0 10 10 11209 Sample Output 0 2