import numpy as np
N,K=map(int,input().split())
a = np.array([int(x) for x in input().split()])
val=sum(a[:K])
max_val=val
for i in range(N-K):
  val+=a[K+i]
  val-=a[i]
  max_val=max(val,max_val)
print(max_val/2+K*0.5) import numpy as np numpy N,K=map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x a = np.array([int(x) for x in input().split()]) a np.array([int(x) for x in input().split()]) np.array np array [int(x) for x in input().split()] val=sum(a[:K]) val sum(a[:K]) sum a[:K] a :K K max_val=val max_val val for i in range(N-K):
  val+=a[K+i]
  val-=a[i]
  max_val=max(val,max_val) i range(N-K) range N-K N K val+=a[K+i] val a[K+i] a K+i K i val-=a[i] val a[i] a i max_val=max(val,max_val) max_val max(val,max_val) max val max_val print(max_val/2+K*0.5) print max_val/2+K*0.5 max_val/2 max_val 2 K*0.5 K 0.5 K=map(int,input().split()) map(int,input().split()) K N,K=map(int,input().split()) map(int,input().split()) N val=sum(a[:K]) sum(a[:K]) val val+=a[K+i] a[K+i] val val-=a[i] a[i] val max_val=val val max_val max_val=max(val,max_val) max(val,max_val) max_val a = np.array([int(x) for x in input().split()]) np.array([int(x) for x in input().split()]) a
import numpy as np
N,K=map(int,input().split())
a = np.array([int(x) for x in input().split()])
val=sum(a[:K])
max_val=val
for i in range(N-K):
  val+=a[K+i]
  val-=a[i]
  max_val=max(val,max_val)
print(max_val/2+K*0.5)