Military base#4112

Military base

1 second
64 megabytes
Easy

A spy satellite has captured an image of a top-secret military base, believed to belong to an adversary. This base is situated in Antarctica, and all its structures are made from ice cubes, appearing as squares in the photograph. The walls of these structures are aligned parallel to the edges of the photograph. No two buildings are adjacent horizontally, vertically, or diagonally, ensuring there is always at least one pixel of empty space between them. Each building is fully contained within the photograph. Your task is to determine the total number of buildings present in the base.

Input

The first line contains the integers and (1 \leq N, M \leq 20), representing the vertical and horizontal dimensions of the photograph in pixels. The next lines each contain characters: the character "." denotes an empty space, while "#" represents a part of a building.

Output

Output the total number of buildings on the base.

Examples

Example 1

Loading
Loading