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

res = 0

P2 = []
for i in P:
  P2.append(0.5 * (i + 1))
num = 0
for i in range(K):
  num += P2[i]
res = num
for i in range(1,N-K+1):
  temp = num + P2[i+K-1] - P2[i-1]
  if temp > res:
    res = temp
  num = temp
  
print(res) 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 res = 0 res 0 P2 = [] P2 [] for i in P:
  P2.append(0.5 * (i + 1)) i P P2.append(0.5 * (i + 1)) P2.append P2 append 0.5 * (i + 1) 0.5 i + 1 i 1 num = 0 num 0 for i in range(K):
  num += P2[i] i range(K) range K num += P2[i] num P2[i] P2 i res = num res num for i in range(1,N-K+1):
  temp = num + P2[i+K-1] - P2[i-1]
  if temp > res:
    res = temp
  num = temp
   i range(1,N-K+1) range 1 N-K+1 N-K N K 1 temp = num + P2[i+K-1] - P2[i-1] temp num + P2[i+K-1] - P2[i-1] num + P2[i+K-1] num P2[i+K-1] P2 i+K-1 i+K i K 1 P2[i-1] P2 i-1 i 1 if temp > res:
    res = temp
   temp > res temp res res = temp res temp num = temp num temp print(res) print res res = 0 0 res N, K = map(int, input().split()) map(int, input().split()) N num = temp temp num res = num num res P2 = [] [] P2 P = list(map(int, input().split())) list(map(int, input().split())) P num += P2[i] P2[i] num temp = num + P2[i+K-1] - P2[i-1] num + P2[i+K-1] - P2[i-1] temp K = map(int, input().split()) map(int, input().split()) K res = temp temp res num = 0 0 num
N, K = map(int, input().split())
P = list(map(int, input().split()))

res = 0

P2 = []
for i in P:
  P2.append(0.5 * (i + 1))
num = 0
for i in range(K):
  num += P2[i]
res = num
for i in range(1,N-K+1):
  temp = num + P2[i+K-1] - P2[i-1]
  if temp > res:
    res = temp
  num = temp
  
print(res)