program abc129d
  implicit none
  character(2000),dimension(:),allocatable :: s
  integer :: h, w, i, j, c, ans
  integer,dimension(:,:,:),allocatable :: grid

  read *, h, w
  allocate(s(h),grid(2,w,h))
  grid = 0

  do i = 1,h
     read *, s(i)
     c = 1
     do j = 1,w
        if (s(i)(j:j)=='#') then
           c = 1
        else
           grid(1,j,i) = c
           c = c + 1
        end if
     end do
     do j = w-1,1,-1
        if (grid(1,j,i)==0.or.grid(1,j+1,i)==0) cycle
        grid(1,j,i) = grid(1,j+1,i)
     end do
  end do

  do j = 1,w
     c = 1
     do i = 1,h
        if (s(i)(j:j)=='#') then
           c = 1
        else
           grid(2,j,i) = c
           c = c + 1
        end if
     end do
     do i = h-1,1,-1
        if (grid(2,j,i)==0.or.grid(2,j,i+1)==0) cycle
        grid(2,j,i) = grid(2,j,i+1)
     end do
  end do

  ans = 0
  do i = 1,h
     do j = 1,w
        if (ans < sum(grid(:,j,i))) ans = sum(grid(:,j,i))
     end do
  end do
  print *, ans-1
end program abc129d
