implicit none

integer :: h,w
character(2000) :: s
logical,allocatable :: map(:,:)
integer,allocatable :: n(:,:)
integer :: i,j,k

read *,h,w
allocate(map(h,w))
map(:,:) = .false.
do i = 1, h
   read *,s
   do j = 1, w
      if (s(j:j) == '#') then
         map(i,j) = .true.
      endif
   enddo
enddo

allocate(n(h,w))
n(:,:) = 0

do i = 1, h
   j = 1
   k = 0
   do while (j <= w)
      if (map(i,j)) then
         if (k > 0) then
            n(i,k:j-1) = j-k
         endif
         k = 0
      else
         if (k == 0) then
            k = j
         endif
      endif
      j = j + 1
   enddo
   if (k > 0) then
      n(i,k:w) = w - k + 1
   endif
enddo

do j = 1, w
   i = 1
   k = 0
   do while (i <= h)
      if (map(i,j)) then
         if (k > 0) then
            n(k:i-1,j) = n(k:i-1,j) + i-k
         endif
         k = 0
      else
         if (k == 0) then
            k = i
         endif
      endif
      i = i + 1
   enddo
   if (k > 0) then
      n(k:h,j) = n(k:h,j) + h - k + 1
   endif
enddo

n(:,:) = n(:,:) - 1

print '(i0)',maxval(n)

stop
end