N, K = map(int, input().split())
P = [(int(x)+1)/2 for x in input().split()]

Q=[0]*(N+1)
for n in range(N):
  Q[n+1]=Q[n]+P[n]

ans=0
for n in range(K,N+1):
  ans=max(ans, Q[n]-Q[n-K])

print(ans) N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K (int(x)+1)/2 for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() (int(x)+1)/2 int(x)+1 int(x) int x 1 2 P = [(int(x)+1)/2 for x in input().split()] P [(int(x)+1)/2 for x in input().split()] Q=[0]*(N+1) Q [0]*(N+1) [0] 0 N+1 N 1 for n in range(N):
  Q[n+1]=Q[n]+P[n] n range(N) range N Q[n+1]=Q[n]+P[n] Q[n+1] Q n+1 n 1 Q[n]+P[n] Q[n] Q n P[n] P n ans=0 ans 0 for n in range(K,N+1):
  ans=max(ans, Q[n]-Q[n-K]) n range(K,N+1) range K N+1 N 1 ans=max(ans, Q[n]-Q[n-K]) ans max(ans, Q[n]-Q[n-K]) max ans Q[n]-Q[n-K] Q[n] Q n Q[n-K] Q n-K n K print(ans) print ans Q=[0]*(N+1) [0]*(N+1) Q N, K = map(int, input().split()) map(int, input().split()) N ans=max(ans, Q[n]-Q[n-K]) max(ans, Q[n]-Q[n-K]) ans P = [(int(x)+1)/2 for x in input().split()] [(int(x)+1)/2 for x in input().split()] P ans=0 0 ans K = map(int, input().split()) map(int, input().split()) K
N, K = map(int, input().split())
P = [(int(x)+1)/2 for x in input().split()]

Q=[0]*(N+1)
for n in range(N):
  Q[n+1]=Q[n]+P[n]

ans=0
for n in range(K,N+1):
  ans=max(ans, Q[n]-Q[n-K])

print(ans)