N, K = [int(s) for s in input().split()]
P = [int(s) for s in input().split()]

# Piの期待値 (1 + Pi) // 2
E = list(map(lambda x: (x + 1) / 2, P))
E_SUMS = [E[0]]
for i in range(1, N):
    E_SUMS.append(E_SUMS[i - 1] + E[i])

m = E_SUMS[K - 1]
for i in range(K, N):
    m = max(m, E_SUMS[i] - E_SUMS[i - K])

print(m) int(s) for s in input().split() for s in input().split() s input().split() ().split () input split for s in input().split() int(s) int s N, K = [int(s) for s in input().split()] N [int(s) for s in input().split()] K int(s) for s in input().split() for s in input().split() s input().split() ().split () input split for s in input().split() int(s) int s P = [int(s) for s in input().split()] P [int(s) for s in input().split()] E = list(map(lambda x: (x + 1) / 2, P)) E 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 E_SUMS = [E[0]] E_SUMS [E[0]] E[0] E 0 for i in range(1, N):
    E_SUMS.append(E_SUMS[i - 1] + E[i]) i range(1, N) range 1 N E_SUMS.append(E_SUMS[i - 1] + E[i]) E_SUMS.append E_SUMS append E_SUMS[i - 1] + E[i] E_SUMS[i - 1] E_SUMS i - 1 i 1 E[i] E i m = E_SUMS[K - 1] m E_SUMS[K - 1] E_SUMS K - 1 K 1 for i in range(K, N):
    m = max(m, E_SUMS[i] - E_SUMS[i - K]) i range(K, N) range K N m = max(m, E_SUMS[i] - E_SUMS[i - K]) m max(m, E_SUMS[i] - E_SUMS[i - K]) max m E_SUMS[i] - E_SUMS[i - K] E_SUMS[i] E_SUMS i E_SUMS[i - K] E_SUMS i - K i K print(m) print m K = [int(s) for s in input().split()] [int(s) for s in input().split()] K E = list(map(lambda x: (x + 1) / 2, P)) list(map(lambda x: (x + 1) / 2, P)) E m = max(m, E_SUMS[i] - E_SUMS[i - K]) max(m, E_SUMS[i] - E_SUMS[i - K]) m N, K = [int(s) for s in input().split()] [int(s) for s in input().split()] N P = [int(s) for s in input().split()] [int(s) for s in input().split()] P m = E_SUMS[K - 1] E_SUMS[K - 1] m E_SUMS = [E[0]] [E[0]] E_SUMS
N, K = [int(s) for s in input().split()]
P = [int(s) for s in input().split()]

# Piの期待値 (1 + Pi) // 2
E = list(map(lambda x: (x + 1) / 2, P))
E_SUMS = [E[0]]
for i in range(1, N):
    E_SUMS.append(E_SUMS[i - 1] + E[i])

m = E_SUMS[K - 1]
for i in range(K, N):
    m = max(m, E_SUMS[i] - E_SUMS[i - K])

print(m)