import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    N,K=MI()
    P=LI()
    S=[0]*(N+1)
    
    for i in range(N):
        S[i+1]=S[i]+P[i]
        
    M=0
    for i in range(N-K+1):
        temp=S[K+i]-S[i]
        M=max(M,temp)
        
    ans=(M+K)/2
    print(ans)

main() import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline def I(): return int(input()) I def MI(): return map(int, input().split()) MI def LI(): return list(map(int, input().split())) LI def main():
    mod=10**9+7
    N,K=MI()
    P=LI()
    S=[0]*(N+1)
    
    for i in range(N):
        S[i+1]=S[i]+P[i]
        
    M=0
    for i in range(N-K+1):
        temp=S[K+i]-S[i]
        M=max(M,temp)
        
    ans=(M+K)/2
    print(ans) main mod=10**9+7 mod 10**9+7 10**9 10 9 7 N,K=MI() N MI() MI K P=LI() P LI() LI S=[0]*(N+1) S [0]*(N+1) [0] 0 N+1 N 1 for i in range(N):
        S[i+1]=S[i]+P[i]
        
     i range(N) range N S[i+1]=S[i]+P[i] S[i+1] S i+1 i 1 S[i]+P[i] S[i] S i P[i] P i M=0 M 0 for i in range(N-K+1):
        temp=S[K+i]-S[i]
        M=max(M,temp)
        
     i range(N-K+1) range N-K+1 N-K N K 1 temp=S[K+i]-S[i] temp S[K+i]-S[i] S[K+i] S K+i K i S[i] S i M=max(M,temp) M max(M,temp) max M temp ans=(M+K)/2 ans (M+K)/2 M+K M K 2 print(ans) print ans main() main def I(): return int(input()) def I(): return int(input()) I def LI(): return list(map(int, input().split())) def LI(): return list(map(int, input().split())) LI def main():
    mod=10**9+7
    N,K=MI()
    P=LI()
    S=[0]*(N+1)
    
    for i in range(N):
        S[i+1]=S[i]+P[i]
        
    M=0
    for i in range(N-K+1):
        temp=S[K+i]-S[i]
        M=max(M,temp)
        
    ans=(M+K)/2
    print(ans) def main():
    mod=10**9+7
    N,K=MI()
    P=LI()
    S=[0]*(N+1)
    
    for i in range(N):
        S[i+1]=S[i]+P[i]
        
    M=0
    for i in range(N-K+1):
        temp=S[K+i]-S[i]
        M=max(M,temp)
        
    ans=(M+K)/2
    print(ans) main input = sys.stdin.readline sys.stdin.readline input def MI(): return map(int, input().split()) def MI(): return map(int, input().split()) MI
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    N,K=MI()
    P=LI()
    S=[0]*(N+1)
    
    for i in range(N):
        S[i+1]=S[i]+P[i]
        
    M=0
    for i in range(N-K+1):
        temp=S[K+i]-S[i]
        M=max(M,temp)
        
    ans=(M+K)/2
    print(ans)

main()
