#import math
#import collections
n,k = map(int, input().split( ))
A = list(map(int, input().split( )))

arr = [0]*n
for i in range(n):
  arr[i] = (A[i]+1)/2

s = sum(arr[:k])
ans = s
for j in range(n-k):
  s = s - arr[j] + arr[j+k]
  ans = max(s,ans)
print(ans) n,k = map(int, input().split( )) n map(int, input().split( )) map int input().split( ) ().split () input split k A = list(map(int, input().split( ))) A list(map(int, input().split( ))) list map(int, input().split( )) map int input().split( ) ().split () input split arr = [0]*n arr [0]*n [0] 0 n for i in range(n):
  arr[i] = (A[i]+1)/2 i range(n) range n arr[i] = (A[i]+1)/2 arr[i] arr i (A[i]+1)/2 A[i]+1 A[i] A i 1 2 s = sum(arr[:k]) s sum(arr[:k]) sum arr[:k] arr :k k ans = s ans s for j in range(n-k):
  s = s - arr[j] + arr[j+k]
  ans = max(s,ans) j range(n-k) range n-k n k s = s - arr[j] + arr[j+k] s s - arr[j] + arr[j+k] s - arr[j] s arr[j] arr j arr[j+k] arr j+k j k ans = max(s,ans) ans max(s,ans) max s ans print(ans) print ans arr = [0]*n [0]*n arr ans = max(s,ans) max(s,ans) ans A = list(map(int, input().split( ))) list(map(int, input().split( ))) A ans = s s ans s = sum(arr[:k]) sum(arr[:k]) s n,k = map(int, input().split( )) map(int, input().split( )) n s = s - arr[j] + arr[j+k] s - arr[j] + arr[j+k] s k = map(int, input().split( )) map(int, input().split( )) k
#import math
#import collections
n,k = map(int, input().split( ))
A = list(map(int, input().split( )))

arr = [0]*n
for i in range(n):
  arr[i] = (A[i]+1)/2

s = sum(arr[:k])
ans = s
for j in range(n-k):
  s = s - arr[j] + arr[j+k]
  ans = max(s,ans)
print(ans)