program abc129_d
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int32):: h,w,x,y
    integer(int32):: l
    integer(int32), allocatable:: a(:,:),ta(:)
    character(1), allocatable:: s(:,:)


    read*, h,w
    allocate(a(w,h), s(w,h))

    input_s : block
        character(w):: inpt_s
        do y=1,h
            read*, inpt_s
            do x=1,w
                s(x,y) = inpt_s(x:x)
            end do
        end do
    end block input_s

    allocate(ta(0:w+1))
    a(:,:) = 0
    do y=1,h
        ta(:) = 0
        do x=1,w
            if (s(x,y) == '.') then
                ta(x) = ta(x-1) + 1
            else
                ta(x) = 0
            end if
        end do
        a(:,y) = a(:,y) + ta(1:w)
        ta(:) = 0
        do x=w,1,-1
            if (s(x,y) == '.') then
                ta(x) = ta(x+1)+1
            else
                ta(x) = 0
            end if
        end do
        a(:,y) = a(:,y) + ta(1:w)
    end do

    deallocate(ta)
    allocate(ta(0:h+1))

    do x=1,w
        ta(:) = 0
        do y=1,h
            if (s(x,y) == '.') then
                ta(y) = ta(y-1) + 1
            else
                ta(y) = 0
            end if
        end do
        a(x,:) = a(x,:) + ta(1:h)
        ta(:) = 0
        do y=h,1,-1
            if (s(x,y) == '.') then
                ta(y) = ta(y+1) + 1
            else
                ta(y) = 0
            end if
        end do
        a(x,:) = a(x,:) + ta(1:h)
    end do

    a(:,:)=a(:,:)-3
    print'(i0)', maxval(a)
end program abc129_d