n,k = map(int,input().split())
p = list(map(int,input().split()))
num = [(i+1) for i in p]
ans = sum(num[:k])
ch = ans
for i in range(n-k):
    ch += num[i+k] - num[i]
    ans = max(ans, ch)
print(ans/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 (i+1) for i in p for i in p i p for i in p i+1 i 1 num = [(i+1) for i in p] num [(i+1) for i in p] ans = sum(num[:k]) ans sum(num[:k]) sum num[:k] num :k k ch = ans ch ans for i in range(n-k):
    ch += num[i+k] - num[i]
    ans = max(ans, ch) i range(n-k) range n-k n k ch += num[i+k] - num[i] ch num[i+k] - num[i] num[i+k] num i+k i k num[i] num i ans = max(ans, ch) ans max(ans, ch) max ans ch print(ans/2) print ans/2 ans 2 n,k = map(int,input().split()) map(int,input().split()) n k = map(int,input().split()) map(int,input().split()) k num = [(i+1) for i in p] [(i+1) for i in p] num ans = sum(num[:k]) sum(num[:k]) ans ch = ans ans ch p = list(map(int,input().split())) list(map(int,input().split())) p ans = max(ans, ch) max(ans, ch) ans ch += num[i+k] - num[i] num[i+k] - num[i] ch
n,k = map(int,input().split())
p = list(map(int,input().split()))
num = [(i+1) for i in p]
ans = sum(num[:k])
ch = ans
for i in range(n-k):
    ch += num[i+k] - num[i]
    ans = max(ans, ch)
print(ans/2)