Weed
Andrew has visited his garden for the last time many years ago. Today's property taxes are so high, so Andrew decided to sell his garden. The land was not cultivated for a long time and now it is probably a lot of weed on it. Andrew wants to remove everything from the ground before selling. Now he wants to estimate the amount of work.
The garden has the rectangular form and is divided into n * m equal squares. Andrew's memory is phenomenal. He remembers which squares were occupied by the weed. For the purpose of simplicity, Andrew thinks that each square is either fully occupied by the weed or completely free from it. Andrew likes botany and he knows that if some square is free from the weed but at least two of its adjacent squares are occupied by the weed (two squares are adjacent if they have common side), that square will be also occupied by the weed soon. Andrew is pretty sure that during last years weed occupied every square possible. Please help Andrew to estimate how many squares is occupied by the weed.
Input
The first line contains integers n and m (1 ≤ n, m ≤ 1000). Next n lines contain m characters each. Character X denotes that the corresponding square is occupied by the weed. A period character ( . ) denotes an empty square.
Output
Print one integer denoting the number of squares occupied by the weed after so many years.