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

l = []
for i in range(N):
    l.append(((1+p[i])*(p[i]/2))/p[i])

que = [0]*(N+1)
for i in range(1,N+1):
    que[i] = l[i-1]+que[i-1]

ans = 0
for i in range(K,len(l)):
    ans = max(ans,que[i+1]-que[i+1-K])

if N == K:
    print(max(que))
else:
    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 l = [] l [] for i in range(N):
    l.append(((1+p[i])*(p[i]/2))/p[i]) i range(N) range N l.append(((1+p[i])*(p[i]/2))/p[i]) l.append l append ((1+p[i])*(p[i]/2))/p[i] (1+p[i])*(p[i]/2) 1+p[i] 1 p[i] p i p[i]/2 p[i] p i 2 p[i] p i que = [0]*(N+1) que [0]*(N+1) [0] 0 N+1 N 1 for i in range(1,N+1):
    que[i] = l[i-1]+que[i-1] i range(1,N+1) range 1 N+1 N 1 que[i] = l[i-1]+que[i-1] que[i] que i l[i-1]+que[i-1] l[i-1] l i-1 i 1 que[i-1] que i-1 i 1 ans = 0 ans 0 for i in range(K,len(l)):
    ans = max(ans,que[i+1]-que[i+1-K]) i range(K,len(l)) range K len(l) len l ans = max(ans,que[i+1]-que[i+1-K]) ans max(ans,que[i+1]-que[i+1-K]) max ans que[i+1]-que[i+1-K] que[i+1] que i+1 i 1 que[i+1-K] que i+1-K i+1 i 1 K if N == K:
    print(max(que))
else:
    print(ans) N == K N K print(max(que)) print max(que) max que print(ans) print ans ans = 0 0 ans N,K = map(int,input().split()) map(int,input().split()) N ans = max(ans,que[i+1]-que[i+1-K]) max(ans,que[i+1]-que[i+1-K]) ans p = list(map(int,input().split())) list(map(int,input().split())) p l = [] [] l K = map(int,input().split()) map(int,input().split()) K que = [0]*(N+1) [0]*(N+1) que
N,K = map(int,input().split())
p = list(map(int,input().split()))

l = []
for i in range(N):
    l.append(((1+p[i])*(p[i]/2))/p[i])

que = [0]*(N+1)
for i in range(1,N+1):
    que[i] = l[i-1]+que[i-1]

ans = 0
for i in range(K,len(l)):
    ans = max(ans,que[i+1]-que[i+1-K])

if N == K:
    print(max(que))
else:
    print(ans)