n,k = map(int,input().split())
P = list(map(int,input().split()))

s=0
for i in range(k):
    s += P[i]

ms=s
for i in range(len(P)-k):
    s +=(P[i+k]-P[i])
    if s>ms :
        ms=s

print( (ms+k)/2)

 n,k = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k P = list(map(int,input().split())) P list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split s=0 s 0 for i in range(k):
    s += P[i] i range(k) range k s += P[i] s P[i] P i ms=s ms s for i in range(len(P)-k):
    s +=(P[i+k]-P[i])
    if s>ms :
        ms=s i range(len(P)-k) range len(P)-k len(P) len P k s +=(P[i+k]-P[i]) s P[i+k]-P[i] P[i+k] P i+k i k P[i] P i if s>ms :
        ms=s s>ms s ms ms=s ms s print( (ms+k)/2) print (ms+k)/2 ms+k ms k 2 k = map(int,input().split()) map(int,input().split()) k ms=s s ms s=0 0 s n,k = map(int,input().split()) map(int,input().split()) n P = list(map(int,input().split())) list(map(int,input().split())) P ms=s s ms s +=(P[i+k]-P[i]) P[i+k]-P[i] s s += P[i] P[i] s
n,k = map(int,input().split())
P = list(map(int,input().split()))

s=0
for i in range(k):
    s += P[i]

ms=s
for i in range(len(P)-k):
    s +=(P[i+k]-P[i])
    if s>ms :
        ms=s

print( (ms+k)/2)


