#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate, product # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入g
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n,k = readInts()
P = list(map(lambda x:int(x)+1, input().split()))
# accumulate
A = [0] + list(accumulate(P))
#print(A)
res = 0
for i in range(n-k+1):
    res = max(res, A[i+k] - A[i])
print(res/2.0) from fractions import gcd from itertools import combinations,permutations,accumulate, product from collections import deque,defaultdict,Counter import decimal decimal import re re import sys sys sys.setrecursionlimit(10000000) sys.setrecursionlimit sys setrecursionlimit 10000000 mod = 10**9 + 7 mod 10**9 + 7 10**9 10 9 7 def readInts():
  return list(map(int,input().split())) readInts return list(map(int,input().split())) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split def I():
  return int(input()) I return int(input()) int(input()) int input() input n,k = readInts() n readInts() readInts k P = list(map(lambda x:int(x)+1, input().split())) P list(map(lambda x:int(x)+1, input().split())) list map(lambda x:int(x)+1, input().split()) map lambda x:int(x)+1 int(x)+1 int(x) int x 1 x input().split() ().split () input split A = [0] + list(accumulate(P)) A [0] + list(accumulate(P)) [0] 0 list(accumulate(P)) list accumulate(P) accumulate P res = 0 res 0 for i in range(n-k+1):
    res = max(res, A[i+k] - A[i]) i range(n-k+1) range n-k+1 n-k n k 1 res = max(res, A[i+k] - A[i]) res max(res, A[i+k] - A[i]) max res A[i+k] - A[i] A[i+k] A i+k i k A[i] A i print(res/2.0) print res/2.0 res 2.0 def readInts():
  return list(map(int,input().split())) def readInts():
  return list(map(int,input().split())) readInts res = 0 0 res res = max(res, A[i+k] - A[i]) max(res, A[i+k] - A[i]) res n,k = readInts() readInts() n mod = 10**9 + 7 10**9 + 7 mod k = readInts() readInts() k P = list(map(lambda x:int(x)+1, input().split())) list(map(lambda x:int(x)+1, input().split())) P def I():
  return int(input()) def I():
  return int(input()) I A = [0] + list(accumulate(P)) [0] + list(accumulate(P)) A
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate, product # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入g
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n,k = readInts()
P = list(map(lambda x:int(x)+1, input().split()))
# accumulate
A = [0] + list(accumulate(P))
#print(A)
res = 0
for i in range(n-k+1):
    res = max(res, A[i+k] - A[i])
print(res/2.0)
