n,k = map(int, input().split())
l = list(map(int, input().split()))

# 期待値:マス目の総和／マス目の数, マス目の最大値+最小値[1]／2
l = [(i+1)/2 for i in l] # 期待値に変換

# 累積和を取得
from itertools import accumulate
cum = [0] + list(accumulate(l))

# 差分を考慮しつつ k個の和をリストする → 最大値が ans
sum_k = []
for j in range(n-k+1):
    sum_k.append(cum[k+j] - cum[j])

print(max(sum_k)) n,k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k l = list(map(int, input().split())) l list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split (i+1)/2 for i in l for i in l i l for i in l (i+1)/2 i+1 i 1 2 l = [(i+1)/2 for i in l] l [(i+1)/2 for i in l] from itertools import accumulate cum = [0] + list(accumulate(l)) cum [0] + list(accumulate(l)) [0] 0 list(accumulate(l)) list accumulate(l) accumulate l sum_k = [] sum_k [] for j in range(n-k+1):
    sum_k.append(cum[k+j] - cum[j]) j range(n-k+1) range n-k+1 n-k n k 1 sum_k.append(cum[k+j] - cum[j]) sum_k.append sum_k append cum[k+j] - cum[j] cum[k+j] cum k+j k j cum[j] cum j print(max(sum_k)) print max(sum_k) max sum_k l = [(i+1)/2 for i in l] [(i+1)/2 for i in l] l sum_k = [] [] sum_k n,k = map(int, input().split()) map(int, input().split()) n l = list(map(int, input().split())) list(map(int, input().split())) l k = map(int, input().split()) map(int, input().split()) k cum = [0] + list(accumulate(l)) [0] + list(accumulate(l)) cum
n,k = map(int, input().split())
l = list(map(int, input().split()))

# 期待値:マス目の総和／マス目の数, マス目の最大値+最小値[1]／2
l = [(i+1)/2 for i in l] # 期待値に変換

# 累積和を取得
from itertools import accumulate
cum = [0] + list(accumulate(l))

# 差分を考慮しつつ k個の和をリストする → 最大値が ans
sum_k = []
for j in range(n-k+1):
    sum_k.append(cum[k+j] - cum[j])

print(max(sum_k))
