Question
Robot Delivery Through Locked Streets

A delivery robot is placed at the top-left corner of a city grid and must reach the bottom-right corner. Some streets are locked.

The robot can only move one cell down or one cell right. Open cells are marked with . and locked cells are marked with #.

Count the number of valid routes from the start to the destination. Print the answer modulo 10^9 + 7.

The hidden idea: the number of ways to reach a cell comes from the cell above it and the cell to its left.

Input

The first line contains two integers KaTeX can only parse string typed expression and KaTeX can only parse string typed expression — the number of rows and columns.

Each of the next KaTeX can only parse string typed expression lines contains a string of length KaTeX can only parse string typed expression containing only KaTeX can only parse string typed expression and KaTeX can only parse string typed expression.

Output

Print a single integer — the number of valid routes modulo KaTeX can only parse string typed expression.

Example
Example 1:
Input
3 3

...
.#.
...
Output
2


Example 2:
Input
2 2

.#
..
Output
1

Online