def main():
    N, K = map(int, input().split())
    P = map(int, input().split())
    E = [(p+1)/2 for p in P]
    sums = [sum(E[0:K])]
    for i in range(N-K):
        sums.append(sums[-1] - E[i] + E[i+K])
    print(max(sums))


if __name__ == '__main__':
    main() def main():
    N, K = map(int, input().split())
    P = map(int, input().split())
    E = [(p+1)/2 for p in P]
    sums = [sum(E[0:K])]
    for i in range(N-K):
        sums.append(sums[-1] - E[i] + E[i+K])
    print(max(sums)) main N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K P = map(int, input().split()) P map(int, input().split()) map int input().split() ().split () input split (p+1)/2 for p in P for p in P p P for p in P (p+1)/2 p+1 p 1 2 E = [(p+1)/2 for p in P] E [(p+1)/2 for p in P] sums = [sum(E[0:K])] sums [sum(E[0:K])] sum(E[0:K]) sum E[0:K] E 0:K 0 K for i in range(N-K):
        sums.append(sums[-1] - E[i] + E[i+K])
     i range(N-K) range N-K N K sums.append(sums[-1] - E[i] + E[i+K]) sums.append sums append sums[-1] - E[i] + E[i+K] sums[-1] - E[i] sums[-1] sums -1 E[i] E i E[i+K] E i+K i K print(max(sums)) print max(sums) max sums if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    N, K = map(int, input().split())
    P = map(int, input().split())
    E = [(p+1)/2 for p in P]
    sums = [sum(E[0:K])]
    for i in range(N-K):
        sums.append(sums[-1] - E[i] + E[i+K])
    print(max(sums)) def main():
    N, K = map(int, input().split())
    P = map(int, input().split())
    E = [(p+1)/2 for p in P]
    sums = [sum(E[0:K])]
    for i in range(N-K):
        sums.append(sums[-1] - E[i] + E[i+K])
    print(max(sums)) main
def main():
    N, K = map(int, input().split())
    P = map(int, input().split())
    E = [(p+1)/2 for p in P]
    sums = [sum(E[0:K])]
    for i in range(N-K):
        sums.append(sums[-1] - E[i] + E[i+K])
    print(max(sums))


if __name__ == '__main__':
    main()
