#include <bits/stdc++.h>   using namespace std;   #define ll long long   int n,m;   char a[6][6];   bool used[6][6];   int ans;   void dfs(int x,int y)   {       if(a[x][y]== * )       {           ans++;       }       if(x==n&&y==m)       {           cout << ans;           exit(0);       }       if(x+1<=n&&a[x+1][y]== * )       {           dfs(x+1,y);       }       if(y+1<=m&&a[x][y+1]== * )       {           dfs(x,y+1);       }       if(y+1<=m)       {           dfs(x,y+1);       }       if(x+1<=n)       {           dfs(x+1,y);       }   }   int main()   {       cin >> n >> m;       for(int i = 1;i<=n;i++)       {           for(int j = 1;j<=m;j++)           {               cin >> a[i][j];           }       }       dfs(1,1);   }    