#!/usr/bin/env python3
def main():
    import numpy as np

    N, K = map(int, input().split())
    P = np.array(input().split(), np.int32)

    P[:] += 1
    Pcum = np.zeros(N + 1, np.int32)
    Pcum[1:] = np.cumsum(P)
    length_K_sums = Pcum[K:] - Pcum[:-K]
    print(length_K_sums.max() / 2)


if __name__ == '__main__':
    main() def main():
    import numpy as np

    N, K = map(int, input().split())
    P = np.array(input().split(), np.int32)

    P[:] += 1
    Pcum = np.zeros(N + 1, np.int32)
    Pcum[1:] = np.cumsum(P)
    length_K_sums = Pcum[K:] - Pcum[:-K]
    print(length_K_sums.max() / 2) main import numpy as np numpy N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K P = np.array(input().split(), np.int32) P np.array(input().split(), np.int32) np.array np array input().split() ().split () input split np.int32 np int32 P[:] += 1 P[:] P : 1 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:] = np.cumsum(P) Pcum[1:] Pcum 1: 1 np.cumsum(P) np.cumsum np cumsum P length_K_sums = Pcum[K:] - Pcum[:-K] length_K_sums Pcum[K:] - Pcum[:-K] Pcum[K:] Pcum K: K Pcum[:-K] Pcum :-K -K K print(length_K_sums.max() / 2) print length_K_sums.max() / 2 length_K_sums.max() length_K_sums.max length_K_sums max 2 if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    import numpy as np

    N, K = map(int, input().split())
    P = np.array(input().split(), np.int32)

    P[:] += 1
    Pcum = np.zeros(N + 1, np.int32)
    Pcum[1:] = np.cumsum(P)
    length_K_sums = Pcum[K:] - Pcum[:-K]
    print(length_K_sums.max() / 2) def main():
    import numpy as np

    N, K = map(int, input().split())
    P = np.array(input().split(), np.int32)

    P[:] += 1
    Pcum = np.zeros(N + 1, np.int32)
    Pcum[1:] = np.cumsum(P)
    length_K_sums = Pcum[K:] - Pcum[:-K]
    print(length_K_sums.max() / 2) main
#!/usr/bin/env python3
def main():
    import numpy as np

    N, K = map(int, input().split())
    P = np.array(input().split(), np.int32)

    P[:] += 1
    Pcum = np.zeros(N + 1, np.int32)
    Pcum[1:] = np.cumsum(P)
    length_K_sums = Pcum[K:] - Pcum[:-K]
    print(length_K_sums.max() / 2)


if __name__ == '__main__':
    main()
