#include using namespace std; int n, m, smax = 0, v[102][102]; char a[102][102]; int maxim (int aa, int bb, int cc) { if ( aa > bb && aa > cc ) return aa; if ( bb > aa && bb > cc ) return bb; return cc; } int main() { cin >> n >> m; for (int i = 1; i <= n; i ++ ) for ( int j = 1; j <= m; j ++ ) cin >> a[i][j]; for (int i = 1; i <= n; i ++ ) for ( int j = 1; j <= m; j ++ ) { if ( a[i][j] == '.' ) { v[i][j] = maxim(v[i-1][j] + 1, v[i][j-1] + 1, 1); if ( v[i][j] > smax ) smax = v[i][j]; } } cout << smax + 1; return 0; }