h, w = gets.split.map(&:to_i)
sl = Array.new(h + 1).map{Array.new(w + 1, 0)}
sr = Array.new(h + 1).map{Array.new(w + 1, 0)}
su = Array.new(h + 1).map{Array.new(w + 1, 0)}
sd = Array.new(h + 1).map{Array.new(w + 1, 0)}
1.upto(h) do |i|
  cl = 0
  cu = 0
  b = gets
  1.upto(w) do |j|
    if b[j - 1] == '.'
      cl += 1
      sl[i][j] = cl
    elsif cl > 0
      cl = 0
    end
    if j == w && cl > 0
      sl[i][j] = cl
    end
    if b[w + 1 - j] == '.'
      cu += 1
      sr[i][w + 1 - j] = cu
    elsif cu > 0
      cu = 0
    end
    if j == w && cu > 0
      sl[i][j] = cu
    end
  end
end
1.upto(w) do |j|
  cu = 0
  cd = 0
  1.upto(h) do |i|
    if sl[i][j] != 0
      cu += 1
      su[i][j] = cu
    elsif cu > 0
      cu = 0
    end
    if j == h && cu > 0
      su[i][j] = cu
    end
    if sl[h + 1 - i][j] != 0
      cd += 1
      sd[h + 1 - i][j] = cd
    elsif cd > 0
      cd = 0
    end
    if j == h && cd > 0
      sd[h + 1 - i][j] = cd
    end
  end
end
ans = 0
1.upto(h) do |i|
  1.upto(w) do |j|
    ans = sl[i][j] + sr[i][j] + su[i][j] + sd[i][j] if ans < sl[i][j] + sr[i][j]+ su[i][j] + sd[i][j] 
  end
end
puts ans - 2