# Template 1.0
import sys, re
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def list2d(a, b, c): return [[c] * b for i in range(a)]
def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx]))
def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret
def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n,k = MAP()

p = LIST()
#
# i=0
# j = k-1

mx = 0

for i in range(k):
    mx+=(p[i]+1)/2
    # print(mx)
gndMax = mx
i = 1
j=k
# print(mx)
while(j<n):
    mx = mx + (p[j] + 1) / 2 - (p[i - 1] + 1) / 2
    gndMax=max(gndMax, mx)
    i+=1
    j+=1
    # print(mx, gndMax)
print(gndMax) import sys, re sys re from collections import deque, defaultdict, Counter, OrderedDict from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians from heapq import heappush, heappop, heapify, nlargest, nsmallest def STR(): return list(input()) STR def INT(): return int(input()) INT def MAP(): return map(int, input().split()) MAP def LIST(): return list(map(int, input().split())) LIST [c] * b for i in range(a) for i in range(a) i range(a) range a for i in range(a) [c] * b [c] c b def list2d(a, b, c): return [[c] * b for i in range(a)] list2d a a b b c c def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx])) sortListWithIndex listOfTuples listOfTuples idx idx def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret sortDictWithVal temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0])) temp sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0])) sorted passedDic.items() passedDic.items passedDic items key=lambda kv: (kv[1], kv[0]) key lambda kv: (kv[1], kv[0]) (kv[1], kv[0]) kv[1] kv 1 kv[0] kv 0 kv toret = {} toret {} for tup in temp:
        toret[tup[0]] = tup[1]
     tup temp toret[tup[0]] = tup[1] toret[tup[0]] toret tup[0] tup 0 tup[1] tup 1 return toret toret passedDic passedDic def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items()))) sortDictWithKey return dict(OrderedDict(sorted(passedDic.items()))) dict(OrderedDict(sorted(passedDic.items()))) dict OrderedDict(sorted(passedDic.items())) OrderedDict sorted(passedDic.items()) sorted passedDic.items() passedDic.items passedDic items passedDic passedDic sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 INF = float('inf') INF float('inf') float 'inf' mod = 10 ** 9 + 7 mod 10 ** 9 + 7 10 ** 9 10 9 7 n,k = MAP() n MAP() MAP k p = LIST() p LIST() LIST mx = 0 mx 0 for i in range(k):
    mx+=(p[i]+1)/2
    # print(mx) i range(k) range k mx+=(p[i]+1)/2 mx (p[i]+1)/2 p[i]+1 p[i] p i 1 2 gndMax = mx gndMax mx i = 1 i 1 j=k j k while(j<n):
    mx = mx + (p[j] + 1) / 2 - (p[i - 1] + 1) / 2
    gndMax=max(gndMax, mx)
    i+=1
    j+=1
    # print(mx, gndMax) j<n j n mx = mx + (p[j] + 1) / 2 - (p[i - 1] + 1) / 2 mx mx + (p[j] + 1) / 2 - (p[i - 1] + 1) / 2 mx + (p[j] + 1) / 2 mx (p[j] + 1) / 2 p[j] + 1 p[j] p j 1 2 (p[i - 1] + 1) / 2 p[i - 1] + 1 p[i - 1] p i - 1 i 1 1 2 gndMax=max(gndMax, mx) gndMax max(gndMax, mx) max gndMax mx i+=1 i 1 j+=1 j 1 print(gndMax) print gndMax def list2d(a, b, c): return [[c] * b for i in range(a)] def list2d(a, b, c): return [[c] * b for i in range(a)] list2d j=k k j gndMax=max(gndMax, mx) max(gndMax, mx) gndMax def MAP(): return map(int, input().split()) def MAP(): return map(int, input().split()) MAP INF = float('inf') float('inf') INF i+=1 1 i mx = 0 0 mx def LIST(): return list(map(int, input().split())) def LIST(): return list(map(int, input().split())) LIST mx+=(p[i]+1)/2 (p[i]+1)/2 mx def STR(): return list(input()) def STR(): return list(input()) STR def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items()))) def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items()))) sortDictWithKey n,k = MAP() MAP() n j+=1 1 j p = LIST() LIST() p mx = mx + (p[j] + 1) / 2 - (p[i - 1] + 1) / 2 mx + (p[j] + 1) / 2 - (p[i - 1] + 1) / 2 mx def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret sortDictWithVal def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx])) def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx])) sortListWithIndex i = 1 1 i gndMax = mx mx gndMax def INT(): return int(input()) def INT(): return int(input()) INT mod = 10 ** 9 + 7 10 ** 9 + 7 mod k = MAP() MAP() k
# Template 1.0
import sys, re
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def list2d(a, b, c): return [[c] * b for i in range(a)]
def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx]))
def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret
def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n,k = MAP()

p = LIST()
#
# i=0
# j = k-1

mx = 0

for i in range(k):
    mx+=(p[i]+1)/2
    # print(mx)
gndMax = mx
i = 1
j=k
# print(mx)
while(j<n):
    mx = mx + (p[j] + 1) / 2 - (p[i - 1] + 1) / 2
    gndMax=max(gndMax, mx)
    i+=1
    j+=1
    # print(mx, gndMax)
print(gndMax)
