EOJ Monthly 2021.9 Sponsored by TuSimple

B. Mine sweeper

单点时限: 1.0 sec

内存限制: 256 MB

Now, little w is playing the game Mine-sweeper. The game is working on a $n \times m$ grid field and each cell contains 0 or 1 mine.

For each cell, little w only know the total number of mines in itself and its 8 adjacent cells. He wants to know the total number of mines in this field, please help him.

输入格式

The first line contains two positive integers $n$ and $m$. $(1 \leq n, m \leq 200)$

In the following $n$ lines, each line contains $m$ integers. And each number represents the information little w knows of a cell, the total number of mines in itself and its 8 adjacent cells.

输出格式

One line with one integer represents the total number of mines.

样例

Input
3 4
2 3 2 1
2 3 2 1
1 2 2 1
Output
3
Input
4 5
1 1 3 3 3
1 2 5 5 4
0 1 4 5 4
0 1 3 4 3
Output
8

提示

For example, suppose the number of mine in a field likes

011
010
000

Then little w will know

233
233
111