import sys


def resolve(in_):
    N, K = map(int, next(in_).split())
    A = map(int, next(in_).split())
    number_plus1 = list(i + 1 for i in A)

    v = [0] * N
    v[0] = sum(number_plus1[:K])
    for i, (before, after) in enumerate(zip(number_plus1, number_plus1[K:]), 1):
        v[i] = v[i - 1] - before + after

    expected = max(v) / 2

    return expected


def main():
    answer = resolve(sys.stdin.buffer)
    print(f'{answer:.12f}')


if __name__ == '__main__':
    main() import sys sys def resolve(in_):
    N, K = map(int, next(in_).split())
    A = map(int, next(in_).split())
    number_plus1 = list(i + 1 for i in A)

    v = [0] * N
    v[0] = sum(number_plus1[:K])
    for i, (before, after) in enumerate(zip(number_plus1, number_plus1[K:]), 1):
        v[i] = v[i - 1] - before + after

    expected = max(v) / 2

    return expected resolve N, K = map(int, next(in_).split()) N map(int, next(in_).split()) map int next(in_).split() (in_).split (in_) next in_ split K A = map(int, next(in_).split()) A map(int, next(in_).split()) map int next(in_).split() (in_).split (in_) next in_ split number_plus1 = list(i + 1 for i in A) number_plus1 list(i + 1 for i in A) list i + 1 i 1 v = [0] * N v [0] * N [0] 0 N v[0] = sum(number_plus1[:K]) v[0] v 0 sum(number_plus1[:K]) sum number_plus1[:K] number_plus1 :K K for i, (before, after) in enumerate(zip(number_plus1, number_plus1[K:]), 1):
        v[i] = v[i - 1] - before + after

     i (before, after) before after enumerate(zip(number_plus1, number_plus1[K:]), 1) enumerate zip(number_plus1, number_plus1[K:]) zip number_plus1 number_plus1[K:] number_plus1 K: K 1 v[i] = v[i - 1] - before + after v[i] v i v[i - 1] - before + after v[i - 1] - before v[i - 1] v i - 1 i 1 before after expected = max(v) / 2 expected max(v) / 2 max(v) max v 2 return expected expected in_ in_ def main():
    answer = resolve(sys.stdin.buffer)
    print(f'{answer:.12f}') main answer = resolve(sys.stdin.buffer) answer resolve(sys.stdin.buffer) resolve sys.stdin.buffer sys.stdin sys stdin buffer print(f'{answer:.12f}') print f'{answer:.12f}' if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    answer = resolve(sys.stdin.buffer)
    print(f'{answer:.12f}') def main():
    answer = resolve(sys.stdin.buffer)
    print(f'{answer:.12f}') main def resolve(in_):
    N, K = map(int, next(in_).split())
    A = map(int, next(in_).split())
    number_plus1 = list(i + 1 for i in A)

    v = [0] * N
    v[0] = sum(number_plus1[:K])
    for i, (before, after) in enumerate(zip(number_plus1, number_plus1[K:]), 1):
        v[i] = v[i - 1] - before + after

    expected = max(v) / 2

    return expected def resolve(in_):
    N, K = map(int, next(in_).split())
    A = map(int, next(in_).split())
    number_plus1 = list(i + 1 for i in A)

    v = [0] * N
    v[0] = sum(number_plus1[:K])
    for i, (before, after) in enumerate(zip(number_plus1, number_plus1[K:]), 1):
        v[i] = v[i - 1] - before + after

    expected = max(v) / 2

    return expected resolve
import sys


def resolve(in_):
    N, K = map(int, next(in_).split())
    A = map(int, next(in_).split())
    number_plus1 = list(i + 1 for i in A)

    v = [0] * N
    v[0] = sum(number_plus1[:K])
    for i, (before, after) in enumerate(zip(number_plus1, number_plus1[K:]), 1):
        v[i] = v[i - 1] - before + after

    expected = max(v) / 2

    return expected


def main():
    answer = resolve(sys.stdin.buffer)
    print(f'{answer:.12f}')


if __name__ == '__main__':
    main()
