Recently, the turtle rented an apartment. By a happy coincidence, it turned out to be rectangular in shape. The apartment is divided into $n \times m$ squares of the same size: $n$ rows with $m$ squares in each. The rows are numbered from top to bottom, and the columns from left to right. We denote the square in the $i$-th row and $j$-th column as $(i, j)$.

In some places in the apartment, there is furniture. The description of the apartment is given by a matrix $a$ of size $n \times m$:
\begin{itemize}
\item If $a_{i,j} = \texttt{\#}$, then the square $(i, j)$ is occupied by furniture.
\item If $a_{i,j} = \texttt{.}$, then the square $(i, j)$ is free.
\end{itemize}

The turtle has been training hard and has learned to move not only to the right or down but also up. To consolidate her success in mastering this new movement, she decided to do exercises every morning. The exercise is described by a string $s$ and proceeds as follows:

\begin{enumerate}
\item The turtle stands in the square $(i, j)$.
\item Then for each $i$ from $1$ to $|s|$, the turtle moves to another square. Suppose she is currently at $(x, y)$, then:
\begin{itemize}
\item If $s_i = \texttt{D}$, the turtle moves to $(x + 1, y)$.
\item If $s_i = \texttt{R}$, the turtle moves to $(x, y + 1)$.
\item If $s_i = \texttt{U}$, the turtle moves to $(x - 1, y)$.
\end{itemize}
\end{enumerate}

Naturally, during the exercise, the turtle cannot go outside the boundaries of the apartment or stand in a square occupied by furniture. Thus, if at any moment the turtle tries to move to a square that does not exist or is occupied by furniture, the exercise fails. The square from which the turtle starts the exercise must also be free.

Help the turtle find the number of squares $(i, j)$ from which she can complete her exercise fully.