def Csum(a):
    b,c=[0],0
    for i in range(len(a)):
        c+=a[i]
        b.append(c)
    return b
n,k=map(int,input().split())
p=Csum(list(map(int,input().split())))
ans=0
for i in range(n-k+1):
    ans=max(ans,p[i+k]-p[i])
print((ans+k)/2) def Csum(a):
    b,c=[0],0
    for i in range(len(a)):
        c+=a[i]
        b.append(c)
    return b Csum b,c=[0],0 b [0] 0 c 0 for i in range(len(a)):
        c+=a[i]
        b.append(c)
     i range(len(a)) range len(a) len a c+=a[i] c a[i] a i b.append(c) b.append b append c return b b a a n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k p=Csum(list(map(int,input().split()))) p Csum(list(map(int,input().split()))) Csum list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split ans=0 ans 0 for i in range(n-k+1):
    ans=max(ans,p[i+k]-p[i]) i range(n-k+1) range n-k+1 n-k n k 1 ans=max(ans,p[i+k]-p[i]) ans max(ans,p[i+k]-p[i]) max ans p[i+k]-p[i] p[i+k] p i+k i k p[i] p i print((ans+k)/2) print (ans+k)/2 ans+k ans k 2 def Csum(a):
    b,c=[0],0
    for i in range(len(a)):
        c+=a[i]
        b.append(c)
    return b def Csum(a):
    b,c=[0],0
    for i in range(len(a)):
        c+=a[i]
        b.append(c)
    return b Csum ans=max(ans,p[i+k]-p[i]) max(ans,p[i+k]-p[i]) ans n,k=map(int,input().split()) map(int,input().split()) n k=map(int,input().split()) map(int,input().split()) k ans=0 0 ans p=Csum(list(map(int,input().split()))) Csum(list(map(int,input().split()))) p
def Csum(a):
    b,c=[0],0
    for i in range(len(a)):
        c+=a[i]
        b.append(c)
    return b
n,k=map(int,input().split())
p=Csum(list(map(int,input().split())))
ans=0
for i in range(n-k+1):
    ans=max(ans,p[i+k]-p[i])
print((ans+k)/2)