\problem{Islands}


You are mapping a faraway planet using a satellite.

The planet's surface can be modeled as a grid.  Your satellite has
captured an image of the surface.  Each grid square is either land
(denoted as `\texttt{L}'), water (denoted as `\texttt{W}'), or covered
by clouds (`\texttt{C}').  Clouds mean that the surface could either
be land or water, but you can't tell.


An island is a maximal region of land where every grid cell in the
island is reachable from every other by a path that only goes up,
down, left or right.

Given an image, determine the minimum number of islands that is
consistent with the given information.


\subsection*{Input}

The first line of input contains two integers, $n$ and $m$ ($1 \leq
n,m \leq 50$), which are the height and width of the image. The next
$n$ lines will each contain exactly $m$ characters, consisting only of
`\texttt{L}', `\texttt{W}' and `\texttt{C}', as explained above.


\subsection*{Output}

Print one line of output containing an integer denoting the minimum
number of islands possible.


\subsection*{Examples}


\begin{center}
  \begin{tabular}{|p{0.45\linewidth}|p{0.45\linewidth}|}
    \multicolumn{1}{l}{\textbf{Sample Input}} &
    \multicolumn{1}{l}{\textbf{Sample Output}} \\
    \hline
4 5  & 0 \\
CCCCC & \\
CCCCC & \\
CCCCC & \\
CCCCC & \\ \hline
3 2 & 1 \\
LW & \\
CC & \\
WL & \\ \hline
  \end{tabular}
\end{center}

In the first example, the planet could be all water under the clouds.

In the second, the planet beneath the clouds could look like

\begin{verbatim}
LW
LL
WL
\end{verbatim}

