c, u, a = Array.new(10,0), Array.new(10,0), 0
gets;s=$<.to_a;s[-1]<<"#";w=s[0].size;s<<Array.new(w,"#")
s.each do |ss|
  t = 0;
  w.times do |i|
     if ss[i] != '.'
       (t...i).each{|j| c[j] = [i-t, c[j]].max;u[j] += 1}
       t = i+1; a = [a, c[i]+u[i]-1].max;c[i] = u[i] = 0;
     end
  end
end
p a