a,b=map(int, input().split())
c=list(map(int, input().split()))
l =[]
ans = 0

def abc(n):
    return (n+1)/2

cb = list(map(abc,c))

s = sum(cb[:b])
l.append(s)

for i in range(b,a):
    s = s - cb[i-b] + cb[i]
    l.append(s)

L = sorted(l)
print(L[-1]) a,b=map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b c=list(map(int, input().split())) c list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split l =[] l [] ans = 0 ans 0 def abc(n):
    return (n+1)/2 abc return (n+1)/2 (n+1)/2 n+1 n 1 2 n n cb = list(map(abc,c)) cb list(map(abc,c)) list map(abc,c) map abc c s = sum(cb[:b]) s sum(cb[:b]) sum cb[:b] cb :b b l.append(s) l.append l append s for i in range(b,a):
    s = s - cb[i-b] + cb[i]
    l.append(s) i range(b,a) range b a s = s - cb[i-b] + cb[i] s s - cb[i-b] + cb[i] s - cb[i-b] s cb[i-b] cb i-b i b cb[i] cb i l.append(s) l.append l append s L = sorted(l) L sorted(l) sorted l print(L[-1]) print L[-1] L -1 c=list(map(int, input().split())) list(map(int, input().split())) c b=map(int, input().split()) map(int, input().split()) b a,b=map(int, input().split()) map(int, input().split()) a s = s - cb[i-b] + cb[i] s - cb[i-b] + cb[i] s ans = 0 0 ans s = sum(cb[:b]) sum(cb[:b]) s cb = list(map(abc,c)) list(map(abc,c)) cb l =[] [] l def abc(n):
    return (n+1)/2 def abc(n):
    return (n+1)/2 abc L = sorted(l) sorted(l) L
a,b=map(int, input().split())
c=list(map(int, input().split()))
l =[]
ans = 0

def abc(n):
    return (n+1)/2

cb = list(map(abc,c))

s = sum(cb[:b])
l.append(s)

for i in range(b,a):
    s = s - cb[i-b] + cb[i]
    l.append(s)

L = sorted(l)
print(L[-1])