def ev(n):
    return (n+1) / 2


N, K = map(int, input().split())
p = list(map(int, input().split()))
prev = ev(p[0])
ans = sum([ev(i) for i in p[:K]])
total = ans

for i in range(1, N-K+1):
    total -= prev
    total += ev(p[i+K-1])
    prev = ev(p[i])
    ans = max(ans, total)

print(ans) def ev(n):
    return (n+1) / 2 ev return (n+1) / 2 (n+1) / 2 n+1 n 1 2 n n 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 prev = ev(p[0]) prev ev(p[0]) ev p[0] p 0 ev(i) for i in p[:K] for i in p[:K] i p[:K] p :K K for i in p[:K] ev(i) ev i ans = sum([ev(i) for i in p[:K]]) ans sum([ev(i) for i in p[:K]]) sum [ev(i) for i in p[:K]] total = ans total ans for i in range(1, N-K+1):
    total -= prev
    total += ev(p[i+K-1])
    prev = ev(p[i])
    ans = max(ans, total) i range(1, N-K+1) range 1 N-K+1 N-K N K 1 total -= prev total prev total += ev(p[i+K-1]) total ev(p[i+K-1]) ev p[i+K-1] p i+K-1 i+K i K 1 prev = ev(p[i]) prev ev(p[i]) ev p[i] p i ans = max(ans, total) ans max(ans, total) max ans total print(ans) print ans def ev(n):
    return (n+1) / 2 def ev(n):
    return (n+1) / 2 ev prev = ev(p[i]) ev(p[i]) prev N, K = map(int, input().split()) map(int, input().split()) N total -= prev prev total ans = sum([ev(i) for i in p[:K]]) sum([ev(i) for i in p[:K]]) ans ans = max(ans, total) max(ans, total) ans total = ans ans total p = list(map(int, input().split())) list(map(int, input().split())) p total += ev(p[i+K-1]) ev(p[i+K-1]) total K = map(int, input().split()) map(int, input().split()) K prev = ev(p[0]) ev(p[0]) prev
def ev(n):
    return (n+1) / 2


N, K = map(int, input().split())
p = list(map(int, input().split()))
prev = ev(p[0])
ans = sum([ev(i) for i in p[:K]])
total = ans

for i in range(1, N-K+1):
    total -= prev
    total += ev(p[i+K-1])
    prev = ev(p[i])
    ans = max(ans, total)

print(ans)
