Dan is an avid stargazer. Every night, he sets up his telescope outside, and observes the stars and constellations for hours long. One night, the skies were clear, and he could observe numerous stars. Fascinated by it, Dan decides to do the following:
The sky can be described as cells of an n∗m matrix, where the cells with stars are marked by '∗' and the rest of the cells are marked by dots ‘.’. A star pattern centred at cell (i,j) is defined as:
1) There is a star at cell (i,j).
2) Both diagonals intersecting at their mid-point (i,j) have equal stars.
Examples of a 1∗1, 3∗3 and 5∗5 star pattern are given below:
NOTE: Two stars patterns are different if one of them contains a star indexed (i,j) which the other does not have.
As Dan wants to stargaze a bit longer, he asks you to calculate the total number of star patterns in the sky.
INPUT:
The first line contains two integers, n and m.
The next n lines contains m characters each, which can be either ‘*’ or ‘.’.
OUTPUT:
Output a single integer, the total number of star patterns.
CONSTRAINTS:
1<=n,m<=103
The stars patterns are:
5 of size 1x1 at indexes (1,1) , (2,2) , (3,3) , (1,3) , (3,1).
1 of size 3x3 with center at (2,2).
So total star patterns are 6.