n, k = map(int, input().split())
p = list(map(int, input().split()))
expected_value = [sum(p[:k])]

for i in range(n - k):
  expected_value.append(expected_value[-1]-p[i]+p[i+k])
print((max(expected_value)+k)/2) 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 expected_value = [sum(p[:k])] expected_value [sum(p[:k])] sum(p[:k]) sum p[:k] p :k k for i in range(n - k):
  expected_value.append(expected_value[-1]-p[i]+p[i+k]) i range(n - k) range n - k n k expected_value.append(expected_value[-1]-p[i]+p[i+k]) expected_value.append expected_value append expected_value[-1]-p[i]+p[i+k] expected_value[-1]-p[i] expected_value[-1] expected_value -1 p[i] p i p[i+k] p i+k i k print((max(expected_value)+k)/2) print (max(expected_value)+k)/2 max(expected_value)+k max(expected_value) max expected_value k 2 k = map(int, input().split()) map(int, input().split()) k n, k = map(int, input().split()) map(int, input().split()) n expected_value = [sum(p[:k])] [sum(p[:k])] expected_value p = list(map(int, input().split())) list(map(int, input().split())) p
n, k = map(int, input().split())
p = list(map(int, input().split()))
expected_value = [sum(p[:k])]

for i in range(n - k):
  expected_value.append(expected_value[-1]-p[i]+p[i+k])
print((max(expected_value)+k)/2)