N,K= list(map(int, input().split()))
Ps = list(map(int, input().split()))

ruisekiwa = [0]

for P in Ps:
    ruisekiwa.append(P + ruisekiwa[-1])

#print(ruisekiwa)
ans = 0
for i in range(N-K+1):
    ans = max(ans, (ruisekiwa[i+K] - ruisekiwa[i] + K) / 2)
#    print(ans)
print(ans) N,K= list(map(int, input().split())) N list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split K Ps = list(map(int, input().split())) Ps list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split ruisekiwa = [0] ruisekiwa [0] 0 for P in Ps:
    ruisekiwa.append(P + ruisekiwa[-1])

#print(ruisekiwa) P Ps ruisekiwa.append(P + ruisekiwa[-1]) ruisekiwa.append ruisekiwa append P + ruisekiwa[-1] P ruisekiwa[-1] ruisekiwa -1 ans = 0 ans 0 for i in range(N-K+1):
    ans = max(ans, (ruisekiwa[i+K] - ruisekiwa[i] + K) / 2)
#    print(ans) i range(N-K+1) range N-K+1 N-K N K 1 ans = max(ans, (ruisekiwa[i+K] - ruisekiwa[i] + K) / 2) ans max(ans, (ruisekiwa[i+K] - ruisekiwa[i] + K) / 2) max ans (ruisekiwa[i+K] - ruisekiwa[i] + K) / 2 ruisekiwa[i+K] - ruisekiwa[i] + K ruisekiwa[i+K] - ruisekiwa[i] ruisekiwa[i+K] ruisekiwa i+K i K ruisekiwa[i] ruisekiwa i K 2 print(ans) print ans N,K= list(map(int, input().split())) list(map(int, input().split())) N ans = 0 0 ans ruisekiwa = [0] [0] ruisekiwa Ps = list(map(int, input().split())) list(map(int, input().split())) Ps K= list(map(int, input().split())) list(map(int, input().split())) K ans = max(ans, (ruisekiwa[i+K] - ruisekiwa[i] + K) / 2) max(ans, (ruisekiwa[i+K] - ruisekiwa[i] + K) / 2) ans
N,K= list(map(int, input().split()))
Ps = list(map(int, input().split()))

ruisekiwa = [0]

for P in Ps:
    ruisekiwa.append(P + ruisekiwa[-1])

#print(ruisekiwa)
ans = 0
for i in range(N-K+1):
    ans = max(ans, (ruisekiwa[i+K] - ruisekiwa[i] + K) / 2)
#    print(ans)
print(ans)