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


def calc(x):
    return (x+1)/2


pe = []
for i in range(N):
    pe.append(calc(p[i]))

cs = [pe[0]] + [0]*(N-1)

for i in range(1, N):
    cs[i] = pe[i] + cs[i-1]

ans = cs[K-1]
for i in range(K, N):
    wa = cs[i] - cs[i-K]
    ans = max(ans, wa)

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 def calc(x):
    return (x+1)/2 calc return (x+1)/2 (x+1)/2 x+1 x 1 2 x x pe = [] pe [] for i in range(N):
    pe.append(calc(p[i])) i range(N) range N pe.append(calc(p[i])) pe.append pe append calc(p[i]) calc p[i] p i cs = [pe[0]] + [0]*(N-1) cs [pe[0]] + [0]*(N-1) [pe[0]] pe[0] pe 0 [0]*(N-1) [0] 0 N-1 N 1 for i in range(1, N):
    cs[i] = pe[i] + cs[i-1] i range(1, N) range 1 N cs[i] = pe[i] + cs[i-1] cs[i] cs i pe[i] + cs[i-1] pe[i] pe i cs[i-1] cs i-1 i 1 ans = cs[K-1] ans cs[K-1] cs K-1 K 1 for i in range(K, N):
    wa = cs[i] - cs[i-K]
    ans = max(ans, wa) i range(K, N) range K N wa = cs[i] - cs[i-K] wa cs[i] - cs[i-K] cs[i] cs i cs[i-K] cs i-K i K ans = max(ans, wa) ans max(ans, wa) max ans wa print(ans) print ans pe = [] [] pe N, K = map(int, input().split()) map(int, input().split()) N K = map(int, input().split()) map(int, input().split()) K p = list(map(int, input().split())) list(map(int, input().split())) p def calc(x):
    return (x+1)/2 def calc(x):
    return (x+1)/2 calc ans = max(ans, wa) max(ans, wa) ans wa = cs[i] - cs[i-K] cs[i] - cs[i-K] wa ans = cs[K-1] cs[K-1] ans cs = [pe[0]] + [0]*(N-1) [pe[0]] + [0]*(N-1) cs
N, K = map(int, input().split())
p = list(map(int, input().split()))


def calc(x):
    return (x+1)/2


pe = []
for i in range(N):
    pe.append(calc(p[i]))

cs = [pe[0]] + [0]*(N-1)

for i in range(1, N):
    cs[i] = pe[i] + cs[i-1]

ans = cs[K-1]
for i in range(K, N):
    wa = cs[i] - cs[i-K]
    ans = max(ans, wa)

print(ans)



