while(h,w=gets.split.map &:to_i)[0]>0
  t=[m=0]*w
  h.times{
    l=gets
    x=[]
    y=[]
    w.times{|i|
      d=t[i]=(b=l[i]<?.)?0:t[i]+1
      y.map!{|j|j<d ?j:d}<<d
      k=-1
      x<<0
      if b
        x.map!{0}
      else
        x.map!{|j|o=y[k+=1]*v=j+1;m<o&&m=o;v}
      end
    }
  }
  p m
end