import bisect,collections,copy,heapq,itertools,math,string
import numpy as np
import sys
sys.setrecursionlimit(10**7)

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

N,K = LI()
p = LI()
E_half = np.array(p) + 1

def main():
    Pcum = np.zeros(N + 1, np.int32)
    Pcum[1:] = E_half.cumsum()
    # print(E_half)
    # print(Pcum)
    partial_sums_E_half = np.zeros(N-K+1, np.int32)
    for i in range(N-K+1):
        partial_sums_E_half[i] = Pcum[i+K] - Pcum[i]

    # partial_sums = Pcum[K:] - Pcum[0:-K]
    return (partial_sums_E_half.max())/2
print(main()) import bisect,collections,copy,heapq,itertools,math,string bisect collections copy heapq itertools math string import numpy as np numpy import sys sys sys.setrecursionlimit(10**7) sys.setrecursionlimit sys setrecursionlimit 10**7 10 7 read = sys.stdin.buffer.read read sys.stdin.buffer.read sys.stdin.buffer sys.stdin sys stdin buffer read readline = sys.stdin.buffer.readline readline sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline readlines = sys.stdin.buffer.readlines readlines sys.stdin.buffer.readlines sys.stdin.buffer sys.stdin sys stdin buffer readlines def _S(): return sys.stdin.readline().rstrip() _S def I(): return int(sys.stdin.readline().rstrip()) I def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI def LS(): return list(sys.stdin.readline().rstrip().split()) LS N,K = LI() N LI() LI K p = LI() p LI() LI E_half = np.array(p) + 1 E_half np.array(p) + 1 np.array(p) np.array np array p 1 def main():
    Pcum = np.zeros(N + 1, np.int32)
    Pcum[1:] = E_half.cumsum()
    # print(E_half)
    # print(Pcum)
    partial_sums_E_half = np.zeros(N-K+1, np.int32)
    for i in range(N-K+1):
        partial_sums_E_half[i] = Pcum[i+K] - Pcum[i]

    # partial_sums = Pcum[K:] - Pcum[0:-K]
    return (partial_sums_E_half.max())/2 main Pcum = np.zeros(N + 1, np.int32) Pcum np.zeros(N + 1, np.int32) np.zeros np zeros N + 1 N 1 np.int32 np int32 Pcum[1:] = E_half.cumsum() Pcum[1:] Pcum 1: 1 E_half.cumsum() E_half.cumsum E_half cumsum partial_sums_E_half = np.zeros(N-K+1, np.int32) partial_sums_E_half np.zeros(N-K+1, np.int32) np.zeros np zeros N-K+1 N-K N K 1 np.int32 np int32 for i in range(N-K+1):
        partial_sums_E_half[i] = Pcum[i+K] - Pcum[i]

    # partial_sums = Pcum[K:] - Pcum[0:-K]
     i range(N-K+1) range N-K+1 N-K N K 1 partial_sums_E_half[i] = Pcum[i+K] - Pcum[i] partial_sums_E_half[i] partial_sums_E_half i Pcum[i+K] - Pcum[i] Pcum[i+K] Pcum i+K i K Pcum[i] Pcum i return (partial_sums_E_half.max())/2 (partial_sums_E_half.max())/2 partial_sums_E_half.max() partial_sums_E_half.max partial_sums_E_half max 2 print(main()) print main() main def main():
    Pcum = np.zeros(N + 1, np.int32)
    Pcum[1:] = E_half.cumsum()
    # print(E_half)
    # print(Pcum)
    partial_sums_E_half = np.zeros(N-K+1, np.int32)
    for i in range(N-K+1):
        partial_sums_E_half[i] = Pcum[i+K] - Pcum[i]

    # partial_sums = Pcum[K:] - Pcum[0:-K]
    return (partial_sums_E_half.max())/2 def main():
    Pcum = np.zeros(N + 1, np.int32)
    Pcum[1:] = E_half.cumsum()
    # print(E_half)
    # print(Pcum)
    partial_sums_E_half = np.zeros(N-K+1, np.int32)
    for i in range(N-K+1):
        partial_sums_E_half[i] = Pcum[i+K] - Pcum[i]

    # partial_sums = Pcum[K:] - Pcum[0:-K]
    return (partial_sums_E_half.max())/2 main readline = sys.stdin.buffer.readline sys.stdin.buffer.readline readline def I(): return int(sys.stdin.readline().rstrip()) def I(): return int(sys.stdin.readline().rstrip()) I def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI E_half = np.array(p) + 1 np.array(p) + 1 E_half readlines = sys.stdin.buffer.readlines sys.stdin.buffer.readlines readlines def LS(): return list(sys.stdin.readline().rstrip().split()) def LS(): return list(sys.stdin.readline().rstrip().split()) LS read = sys.stdin.buffer.read sys.stdin.buffer.read read p = LI() LI() p def _S(): return sys.stdin.readline().rstrip() def _S(): return sys.stdin.readline().rstrip() _S N,K = LI() LI() N K = LI() LI() K
import bisect,collections,copy,heapq,itertools,math,string
import numpy as np
import sys
sys.setrecursionlimit(10**7)

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

N,K = LI()
p = LI()
E_half = np.array(p) + 1

def main():
    Pcum = np.zeros(N + 1, np.int32)
    Pcum[1:] = E_half.cumsum()
    # print(E_half)
    # print(Pcum)
    partial_sums_E_half = np.zeros(N-K+1, np.int32)
    for i in range(N-K+1):
        partial_sums_E_half[i] = Pcum[i+K] - Pcum[i]

    # partial_sums = Pcum[K:] - Pcum[0:-K]
    return (partial_sums_E_half.max())/2
print(main())
