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

S = [0]
sum_ = 0
for i, p in enumerate(P):
  sum_ += p
  S.append(sum_)


max_sum = 0
for i in range(N-K+1):
  max_sum = max(max_sum, S[i+K] - S[i])

res = (max_sum + K) / 2

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 S = [0] S [0] 0 sum_ = 0 sum_ 0 for i, p in enumerate(P):
  sum_ += p
  S.append(sum_) i p enumerate(P) enumerate P sum_ += p sum_ p S.append(sum_) S.append S append sum_ max_sum = 0 max_sum 0 for i in range(N-K+1):
  max_sum = max(max_sum, S[i+K] - S[i]) i range(N-K+1) range N-K+1 N-K N K 1 max_sum = max(max_sum, S[i+K] - S[i]) max_sum max(max_sum, S[i+K] - S[i]) max max_sum S[i+K] - S[i] S[i+K] S i+K i K S[i] S i res = (max_sum + K) / 2 res (max_sum + K) / 2 max_sum + K max_sum K 2 print(res) print res sum_ += p p sum_ max_sum = max(max_sum, S[i+K] - S[i]) max(max_sum, S[i+K] - S[i]) max_sum res = (max_sum + K) / 2 (max_sum + K) / 2 res sum_ = 0 0 sum_ P = list(map(int, input().split())) list(map(int, input().split())) P K = map(int, input().split()) map(int, input().split()) K S = [0] [0] S max_sum = 0 0 max_sum N, K = map(int, input().split()) map(int, input().split()) N
N, K = map(int, input().split())
P = list(map(int, input().split()))

S = [0]
sum_ = 0
for i, p in enumerate(P):
  sum_ += p
  S.append(sum_)


max_sum = 0
for i in range(N-K+1):
  max_sum = max(max_sum, S[i+K] - S[i])

res = (max_sum + K) / 2

print(res)