#include <iostream>
#include <algorithm>
using namespace std;

int H,W,x,y,z,mv;
char fc[504][500];
int f[504][502];
int dp[2][500][501];

int main(){
    while( cin >> H >> W, H|W ){
        mv = 0;
        for(x = 0; x < H; x++){
            cin >> (fc[x]+1);
            for(y = 0; y <= W; y++){
                f[x][y] = (fc[x][y] == '.');
            }
            for(y = 0; y < W; y++){
                f[x][y+1] += f[x][y];
            }
            for(y = 0; y < W; y++){
                for(z = y+1; z <= W; z++){
                    if( f[x][z] - f[x][y] == z-y ){
                        dp[x%2][y][z] = z-y;
                        if( x ){
                            dp[x%2][y][z] += dp[(x-1)%2][y][z];
                        }
                    }else{
                        dp[x%2][y][z] = 0;
                    }
                    mv = max(mv, dp[x%2][y][z]);
                }
            }
        }
        cout << mv << endl;
    }
    return 0;
}