program main
  implicit none
  integer :: h, w, x, y, l, r
  character(2000) :: s(2000)
  integer, allocatable :: tate(:, :), yoko(:, :)
  read *, h, w
  allocate (tate(w, h), yoko(w, h))
  do y = 1, h
    read *, s(y)
  end do
  yoko = 0
  tate = 0
  do y = 1, h
    do l = 1, w
      if ((l == 1 .or. s(y)(l - 1:l - 1) == "#") .and. s(y)(l:l) == ".") then
        do r = l, w
          if (r == w .or. s(y)(r + 1:r + 1) == "#") exit
        end do
        do x = l, r
          yoko(x, y) = r - l + 1
        end do
      end if
    end do
  end do
  do x = 1, w
    do l = 1, h
      if ((l == 1 .or. s(l - 1)(x:x) == "#") .and. s(l)(x:x) == ".") then
        do r = l, h
          if (r == h .or. s(r + 1)(x:x) == "#") exit
        end do
        do y = l, r
          tate(x, y) = r - l + 1
        end do
      end if
    end do
  end do
  print "(i0)", maxval(yoko + tate - 1)
end program main
