Corners
A monochrome graphic file has a resolution of n×m pixels. Each pixel is either white or black. A connected component of black pixels is defined as the largest group of black pixels where each pixel can be reached from any other by moving right, left, up, or down through black pixels. For instance, in the first test case, there are four connected components of black pixels. A component is termed a corner if it consists of two perpendicular segments intersecting at their endpoints. In the first test case, there are two corners. Your task is to determine the number of corners in the given image.
Input
The input file contains one or more images. The first line of each image description provides two natural numbers n and m (1 ≤ n ≤ 50; 1 ≤ m ≤ 50). Following this, there are n rows, each containing m characters. The character "." represents a white pixel, and the character "*" represents a black pixel. The total number of images in the file does not exceed 50.
Output
For each image, output the number of corners on a separate line.