import sys
from itertools import accumulate

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N, K, *P = map(int, read().split())

    csum = [0]
    csum.extend(accumulate(P))

    ans = 0
    for i in range(N - K + 1):
        if ans < csum[i + K] - csum[i]:
            ans = csum[i + K] - csum[i]

    print((K + ans) / 2)
    return


if __name__ == '__main__':
    main() import sys sys from itertools import accumulate read = sys.stdin.read read sys.stdin.read sys.stdin sys stdin read readline = sys.stdin.readline readline sys.stdin.readline sys.stdin sys stdin readline readlines = sys.stdin.readlines readlines sys.stdin.readlines sys.stdin sys stdin readlines sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 INF = 1 << 60 INF 1 << 60 1 60 MOD = 1000000007 MOD 1000000007 def main():
    N, K, *P = map(int, read().split())

    csum = [0]
    csum.extend(accumulate(P))

    ans = 0
    for i in range(N - K + 1):
        if ans < csum[i + K] - csum[i]:
            ans = csum[i + K] - csum[i]

    print((K + ans) / 2)
    return main N, K, *P = map(int, read().split()) N map(int, read().split()) map int read().split() ().split () read split K *P P csum = [0] csum [0] 0 csum.extend(accumulate(P)) csum.extend csum extend accumulate(P) accumulate P ans = 0 ans 0 for i in range(N - K + 1):
        if ans < csum[i + K] - csum[i]:
            ans = csum[i + K] - csum[i]

     i range(N - K + 1) range N - K + 1 N - K N K 1 if ans < csum[i + K] - csum[i]:
            ans = csum[i + K] - csum[i]

     ans < csum[i + K] - csum[i] ans csum[i + K] - csum[i] csum[i + K] csum i + K i K csum[i] csum i ans = csum[i + K] - csum[i] ans csum[i + K] - csum[i] csum[i + K] csum i + K i K csum[i] csum i print((K + ans) / 2) print (K + ans) / 2 K + ans K ans 2 return if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main readlines = sys.stdin.readlines sys.stdin.readlines readlines read = sys.stdin.read sys.stdin.read read def main():
    N, K, *P = map(int, read().split())

    csum = [0]
    csum.extend(accumulate(P))

    ans = 0
    for i in range(N - K + 1):
        if ans < csum[i + K] - csum[i]:
            ans = csum[i + K] - csum[i]

    print((K + ans) / 2)
    return def main():
    N, K, *P = map(int, read().split())

    csum = [0]
    csum.extend(accumulate(P))

    ans = 0
    for i in range(N - K + 1):
        if ans < csum[i + K] - csum[i]:
            ans = csum[i + K] - csum[i]

    print((K + ans) / 2)
    return main readline = sys.stdin.readline sys.stdin.readline readline MOD = 1000000007 1000000007 MOD INF = 1 << 60 1 << 60 INF
import sys
from itertools import accumulate

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N, K, *P = map(int, read().split())

    csum = [0]
    csum.extend(accumulate(P))

    ans = 0
    for i in range(N - K + 1):
        if ans < csum[i + K] - csum[i]:
            ans = csum[i + K] - csum[i]

    print((K + ans) / 2)
    return


if __name__ == '__main__':
    main()
