// Arup Guha
// 4/2/2024
// Solution to CSES Problem: Grid Path
// https://cses.fi/problemset/task/1638

import java.util.*;

public class gridpath {

	public static void main(String[] args) {
	
		// Read in the grid.
		Scanner stdin = new Scanner(System.in);
		int n = stdin.nextInt();
		char[][] g = new char[n][];
		for (int i=0; i<n; i++)
			g[i] = stdin.next().toCharArray();
			
		// Allocate DP array.
		int[][] dp = new int[n][n];
		
		// Fill in row 0.
		int cur = 1;
		for (int i=0; i<n; i++) {
			if (g[0][i] == '*') cur = 0;
			dp[0][i] = cur;
		}
		
		// Fill in column 0.
		cur = 1;
		for (int i=0; i<n; i++) {
			if (g[i][0] == '*') cur = 0;
			dp[i][0] = cur;
		}
		
		// Go through the rest.
		for (int i=1; i<n; i++) {
			for (int j=1; j<n; j++) {
				
				// 0 is already in the DP array, so we can just skip these.
				if (g[i][j] == '*') continue;
				
				// Otherwise, just add from the two places we could come from.
				dp[i][j] = (dp[i-1][j]+dp[i][j-1])%1000000007;
			}
		}
		
		// Ta da!
		System.out.println(dp[n-1][n-1]);
	}
}