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

P = [int(_) for _ in input().split()]

for i in range(N):
    P[i] = int(P[i] * (1 + P[i]) / 2) / P[i]

ans = 0
tmp = 0
for i in range(N):
    tmp += P[i]
    if i < K - 1: continue
    ans = max(tmp, ans)
    tmp -= P[i - K + 1]
print(ans) int(_) for _ in input().split() for _ in input().split() _ input().split() ().split () input split for _ in input().split() int(_) int _ N, K = [int(_) for _ in input().split()] N [int(_) for _ in input().split()] K int(_) for _ in input().split() for _ in input().split() _ input().split() ().split () input split for _ in input().split() int(_) int _ P = [int(_) for _ in input().split()] P [int(_) for _ in input().split()] for i in range(N):
    P[i] = int(P[i] * (1 + P[i]) / 2) / P[i] i range(N) range N P[i] = int(P[i] * (1 + P[i]) / 2) / P[i] P[i] P i int(P[i] * (1 + P[i]) / 2) / P[i] int(P[i] * (1 + P[i]) / 2) int P[i] * (1 + P[i]) / 2 P[i] * (1 + P[i]) P[i] P i 1 + P[i] 1 P[i] P i 2 P[i] P i ans = 0 ans 0 tmp = 0 tmp 0 for i in range(N):
    tmp += P[i]
    if i < K - 1: continue
    ans = max(tmp, ans)
    tmp -= P[i - K + 1] i range(N) range N tmp += P[i] tmp P[i] P i if i < K - 1: continue
     i < K - 1 i K - 1 K 1 ans = max(tmp, ans) ans max(tmp, ans) max tmp ans tmp -= P[i - K + 1] tmp P[i - K + 1] P i - K + 1 i - K i K 1 print(ans) print ans tmp += P[i] P[i] tmp ans = max(tmp, ans) max(tmp, ans) ans tmp -= P[i - K + 1] P[i - K + 1] tmp tmp = 0 0 tmp ans = 0 0 ans N, K = [int(_) for _ in input().split()] [int(_) for _ in input().split()] N K = [int(_) for _ in input().split()] [int(_) for _ in input().split()] K P = [int(_) for _ in input().split()] [int(_) for _ in input().split()] P
N, K = [int(_) for _ in input().split()]

P = [int(_) for _ in input().split()]

for i in range(N):
    P[i] = int(P[i] * (1 + P[i]) / 2) / P[i]

ans = 0
tmp = 0
for i in range(N):
    tmp += P[i]
    if i < K - 1: continue
    ans = max(tmp, ans)
    tmp -= P[i - K + 1]
print(ans)
