Isolator#5070

Isolator

1 second
64 megabytes
Very easy

The isolation ward consists of a grid with dimensions by , where each cell either contains a bed of size 1 \times 1 or is empty. The ward is divided into multiple sectors, where movement is possible between adjacent cells within the same sector, but not between different sectors. Your task is to determine the number of such sectors.

Input

The first line contains two integers, and (1 \leq N, M \leq 100), representing the dimensions of the isolation ward. The following lines each contain integers, where a indicates the presence of a bed in that cell, and a indicates an empty cell.

Output

Output the total number of sectors in the isolation ward.

Examples

Example 1

Loading
Loading