# coding: utf-8

import sys

import numpy as np



sr = lambda: sys.stdin.readline().rstrip()

ir = lambda: int(sr())

lr = lambda: list(map(int, sr().split()))



N, K = lr()

P = np.array([0] + lr(), np.float64)

P = (P+1) / 2

Pcum = P.cumsum()

expectation = Pcum[K:] - Pcum[:-K]

answer = expectation.max()

print(answer)

# coding: utf-8

import sys

import numpy as np



sr = lambda: sys.stdin.readline().rstrip()

ir = lambda: int(sr())

lr = lambda: list(map(int, sr().split()))



N, K = lr()

P = np.array(lr())

P = np.hstack([[0], P+1])

Pcum = P.cumsum()

result = Pcum[K:] - Pcum[:-K]

answer = result.max()

print((answer / 2))

# coding: utf-8
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
N, K = lr()
P = np.array([0] + lr(), np.float64)
P = (P + 1) / 2
Pcum = P.cumsum()
expectation = Pcum[K:] - Pcum[:-K]
answer = expectation.max()
print(answer)

# coding: utf-8
import sys
import numpy as np

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
N, K = lr()
P = np.array(lr())
P = np.hstack([[0], P + 1])
Pcum = P.cumsum()
result = Pcum[K:] - Pcum[:-K]
answer = result.max()
print((answer / 2))

-P = np.array([0] + lr(), np.float64) -P = (P + 1) / 2 +P = np.array(lr()) +P = np.hstack([[0], P + 1]) -expectation = Pcum[K:] - Pcum[:-K] -answer = expectation.max() -print(answer) +result = Pcum[K:] - Pcum[:-K] +answer = result.max() +print((answer / 2))