program ABC154D
    implicit none
    integer(8)::N,K,i
    real(8)::result=0
    real(8),allocatable,dimension(:)::P,E
    read(5,*)N,K
    allocate(P(N))
    allocate(E(N))
    read(5,*)(P(i),i=1,N)

    do i=1,N
        if(i==1)then
            E(i)=((P(i)*(P(i)+1))/2)/P(i)
        else
            E(i)=E(i-1)+((P(i)*(P(i)+1))/2)/P(i)
        end if
    end do

    do i=K,N
        if(i==K)then
            if(E(i)>result)result=E(i)
        else if(E(i)-E(i-K)>result)then
            result=E(i)-E(i-K)
        end if
    end do

    print'(f0.10)',result
end program ABC154D