#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 # (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でやると正解するかも！！
#
#

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 = [0] + list(map(lambda x: int (x) + 1, input().split()))
cum = list(accumulate(p))
res = 0
for i in range(len(p)-k):
    res = max(res, cum[i+k] - cum[i])
print(res / 2) from fractions import gcd from itertools import combinations,permutations,accumulate 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 = [0] + list(map(lambda x: int (x) + 1, input().split())) p [0] + list(map(lambda x: int (x) + 1, input().split())) [0] 0 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 cum = list(accumulate(p)) cum list(accumulate(p)) list accumulate(p) accumulate p res = 0 res 0 for i in range(len(p)-k):
    res = max(res, cum[i+k] - cum[i]) i range(len(p)-k) range len(p)-k len(p) len p k res = max(res, cum[i+k] - cum[i]) res max(res, cum[i+k] - cum[i]) max res cum[i+k] - cum[i] cum[i+k] cum i+k i k cum[i] cum i print(res / 2) print res / 2 res 2 def I():
  return int(input()) def I():
  return int(input()) I p = [0] + list(map(lambda x: int (x) + 1, input().split())) [0] + list(map(lambda x: int (x) + 1, input().split())) p cum = list(accumulate(p)) list(accumulate(p)) cum res = 0 0 res mod = 10**9 + 7 10**9 + 7 mod res = max(res, cum[i+k] - cum[i]) max(res, cum[i+k] - cum[i]) res n,k = readInts() readInts() n k = readInts() readInts() k def readInts():
  return list(map(int,input().split())) def readInts():
  return list(map(int,input().split())) readInts
#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 # (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でやると正解するかも！！
#
#

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 = [0] + list(map(lambda x: int (x) + 1, input().split()))
cum = list(accumulate(p))
res = 0
for i in range(len(p)-k):
    res = max(res, cum[i+k] - cum[i])
print(res / 2)
