n, k = list(map(int, input().split(' ')))
aaa = list(map(int, input().split(' ')))
ans = 0
v = []
for a in aaa:
  v.append((a * (a + 1)) / (2.0 * a))

current = 0
for i in range(n):
  current += v[i]
  if i >= k:
    current -= v[i-k]
  ans = max(ans, current)
print(ans) n, k = list(map(int, input().split(' '))) n list(map(int, input().split(' '))) list map(int, input().split(' ')) map int input().split(' ') ().split () input split ' ' k aaa = list(map(int, input().split(' '))) aaa list(map(int, input().split(' '))) list map(int, input().split(' ')) map int input().split(' ') ().split () input split ' ' ans = 0 ans 0 v = [] v [] for a in aaa:
  v.append((a * (a + 1)) / (2.0 * a)) a aaa v.append((a * (a + 1)) / (2.0 * a)) v.append v append (a * (a + 1)) / (2.0 * a) a * (a + 1) a a + 1 a 1 2.0 * a 2.0 a current = 0 current 0 for i in range(n):
  current += v[i]
  if i >= k:
    current -= v[i-k]
  ans = max(ans, current) i range(n) range n current += v[i] current v[i] v i if i >= k:
    current -= v[i-k]
   i >= k i k current -= v[i-k] current v[i-k] v i-k i k ans = max(ans, current) ans max(ans, current) max ans current print(ans) print ans n, k = list(map(int, input().split(' '))) list(map(int, input().split(' '))) n current -= v[i-k] v[i-k] current current = 0 0 current current += v[i] v[i] current ans = max(ans, current) max(ans, current) ans v = [] [] v ans = 0 0 ans k = list(map(int, input().split(' '))) list(map(int, input().split(' '))) k aaa = list(map(int, input().split(' '))) list(map(int, input().split(' '))) aaa
n, k = list(map(int, input().split(' ')))
aaa = list(map(int, input().split(' ')))
ans = 0
v = []
for a in aaa:
  v.append((a * (a + 1)) / (2.0 * a))

current = 0
for i in range(n):
  current += v[i]
  if i >= k:
    current -= v[i-k]
  ans = max(ans, current)
print(ans)