Chess board (2)

Consider a chess board with rr rows and cc columns, where every square contains between 0 and 9 coins. Supose that the upper-left square is white. For instance, this is an empty board with four rows and five columns:

Write a program such that, given a chess board, computes the total number of coins on its white squares.

Input

Input begins with the number of rows rr and the number of columns cc. Follow rr lines, each one with cc characters between ‘0’ and ‘9’.

Output

Print the total number of coins on the white squares of the board.

Problem information

Author: Unknown
Translator: Salvador Roura

Generation: 2026-01-25T10:07:21.859Z

© Jutge.org, 2006–2026.
https://jutge.org