N, K = map(int, input().split())
p = list(map(int, input().split()))
p = list(map(lambda x: (x + 1)/2, p))
ans = 0
for i in range(1, len(p)):
    p[i] += p[i - 1]
for i in range(K - 1, len(p)):
    if i == K - 1:
        ans = p[i]
    else:
        ans = max(ans, p[i] - p[i - K])
print(ans) 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 p = list(map(lambda x: (x + 1)/2, p)) p list(map(lambda x: (x + 1)/2, p)) list map(lambda x: (x + 1)/2, p) map lambda x: (x + 1)/2 (x + 1)/2 x + 1 x 1 2 x p ans = 0 ans 0 for i in range(1, len(p)):
    p[i] += p[i - 1] i range(1, len(p)) range 1 len(p) len p p[i] += p[i - 1] p[i] p i p[i - 1] p i - 1 i 1 for i in range(K - 1, len(p)):
    if i == K - 1:
        ans = p[i]
    else:
        ans = max(ans, p[i] - p[i - K]) i range(K - 1, len(p)) range K - 1 K 1 len(p) len p if i == K - 1:
        ans = p[i]
    else:
        ans = max(ans, p[i] - p[i - K]) i == K - 1 i K - 1 K 1 ans = p[i] ans p[i] p i ans = max(ans, p[i] - p[i - K]) ans max(ans, p[i] - p[i - K]) max ans p[i] - p[i - K] p[i] p i p[i - K] p i - K i K print(ans) print ans p = list(map(int, input().split())) list(map(int, input().split())) p ans = p[i] p[i] ans p = list(map(lambda x: (x + 1)/2, p)) list(map(lambda x: (x + 1)/2, p)) p ans = max(ans, p[i] - p[i - K]) max(ans, p[i] - p[i - K]) ans K = map(int, input().split()) map(int, input().split()) K ans = 0 0 ans N, K = map(int, input().split()) map(int, input().split()) N
N, K = map(int, input().split())
p = list(map(int, input().split()))
p = list(map(lambda x: (x + 1)/2, p))
ans = 0
for i in range(1, len(p)):
    p[i] += p[i - 1]
for i in range(K - 1, len(p)):
    if i == K - 1:
        ans = p[i]
    else:
        ans = max(ans, p[i] - p[i - K])
print(ans)