#include <iostream>
#include <complex>
#include <sstream>
#include <string>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
#include <set>
#include <limits>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <ctime>
using namespace std;
#define REP(i, j) for(int i = 0; i < (int)(j); ++i)
#define FOR(i, j, k) for(int i = (int)(j); i < (int)(k); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define REVERSE(v) reverse((v).begin(), (v).end())
typedef complex<double> P;

int H, W;
vector<string> v;

int solve(int x1, int y1, int x2, int y2){
  int cnt = 0;
  bool f = 1;
  FOR(y, y1, y2) FOR(x, x1, x2) if(v[y][x] == '.') f = 0;
  if(f) return 0;
  FOR(y, y1, y2){
    FOR(x, x1, x2){
      if(v[y][x] == '.') ++cnt;
      else return max(max(solve(x1, y1, x, y2), solve(x + 1, y1, x2, y2)), max(solve(x1, y1, x2, y), solve(x1, y + 1, x2, y2)));
    }
  }
  return cnt;
}

int main() {
  while(cin >>H >>W && H && W){
    v = vector<string>(H);
    REP(i, H) cin >>v[i];
    cout <<solve(0, 0, W, H) <<endl;
  }
  return 0;
}