Competitions

# Depth First Search - Labyrinths

# Square punch

During the Summer School August 2009 the hole punch was tested that makes the square holes. The size of the badge is **n** × **m** cells, each of which can be punched. On the diagram **1** is a punched cell, **0** is not punched. How many little badges will remain after using a punch?

#### Input

The first line contains the sizes of the badge **n** and **m** (**1** ≤ **n**, **m** ≤ **100**). The next **n** lines contain a diagram of the punctured badge.

#### Output

Print the number of little badges that will remain after using a punch.

Input example #1

5 4 0 0 1 0 0 1 0 0 1 1 1 1 0 0 0 0 1 1 0 0

Output example #1

3

Input example #2

3 3 0 0 0 0 1 0 0 0 0

Output example #2

1