def main():
    N,K=map(int,input().split())
    p=list(map(int,input().split()))

    E=[]

    for i in p:
        E.append((1+i)/2)

    S=[0]

    s=0
    for i in E:
        s+=i
        S.append(s)

    max=0
    right=0
    left=right+K

    while left<len(S):
        res=S[left]-S[right]
        if res>=max:
            max=res
        right+=1
        left=right+K

    print(max)

if __name__=="__main__":
    main() def main():
    N,K=map(int,input().split())
    p=list(map(int,input().split()))

    E=[]

    for i in p:
        E.append((1+i)/2)

    S=[0]

    s=0
    for i in E:
        s+=i
        S.append(s)

    max=0
    right=0
    left=right+K

    while left<len(S):
        res=S[left]-S[right]
        if res>=max:
            max=res
        right+=1
        left=right+K

    print(max) main N,K=map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K p=list(map(int,input().split())) p list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split E=[] E [] for i in p:
        E.append((1+i)/2)

     i p E.append((1+i)/2) E.append E append (1+i)/2 1+i 1 i 2 S=[0] S [0] 0 s=0 s 0 for i in E:
        s+=i
        S.append(s)

     i E s+=i s i S.append(s) S.append S append s max=0 max 0 right=0 right 0 left=right+K left right+K right K while left<len(S):
        res=S[left]-S[right]
        if res>=max:
            max=res
        right+=1
        left=right+K

     left<len(S) left len(S) len S res=S[left]-S[right] res S[left]-S[right] S[left] S left S[right] S right if res>=max:
            max=res
         res>=max res max max=res max res right+=1 right 1 left=right+K left right+K right K print(max) print max if __name__=="__main__":
    main() __name__=="__main__" __name__ "__main__" main() main def main():
    N,K=map(int,input().split())
    p=list(map(int,input().split()))

    E=[]

    for i in p:
        E.append((1+i)/2)

    S=[0]

    s=0
    for i in E:
        s+=i
        S.append(s)

    max=0
    right=0
    left=right+K

    while left<len(S):
        res=S[left]-S[right]
        if res>=max:
            max=res
        right+=1
        left=right+K

    print(max) def main():
    N,K=map(int,input().split())
    p=list(map(int,input().split()))

    E=[]

    for i in p:
        E.append((1+i)/2)

    S=[0]

    s=0
    for i in E:
        s+=i
        S.append(s)

    max=0
    right=0
    left=right+K

    while left<len(S):
        res=S[left]-S[right]
        if res>=max:
            max=res
        right+=1
        left=right+K

    print(max) main
def main():
    N,K=map(int,input().split())
    p=list(map(int,input().split()))

    E=[]

    for i in p:
        E.append((1+i)/2)

    S=[0]

    s=0
    for i in E:
        s+=i
        S.append(s)

    max=0
    right=0
    left=right+K

    while left<len(S):
        res=S[left]-S[right]
        if res>=max:
            max=res
        right+=1
        left=right+K

    print(max)

if __name__=="__main__":
    main()
