#include #include using namespace std; char cit[200]; int dp[105][105]; int main() { //freopen("input", "r", stdin); //freopen("output", "w", stdout); int n, m, i, j, sol=0; scanf("%d %d\n", &n, &m); dp[1][1]=1; for(i=1;i<=n;i++) { fgets(cit+1, 200, stdin); for(j=1;j<=m;j++) { if(cit[j]=='.') { if(dp[i-1][j]|| dp[i][j-1]) dp[i][j]=max(dp[i-1][j], dp[i][j-1])+1; sol=max(sol, dp[i][j]); } } } printf("%d", sol); }