import math
from math import gcd,pi,sqrt
INF = float("inf")

import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]


def main():
    n, k = i_map()
    p = i_list()


    sowa = [0]
    for i in range(1,1001):
        sowa.append(sowa[i-1]+i)

    l = [sowa[p[0]]/p[0]]

    for i in range(1,n):
        l.append(l[i-1] + sowa[p[i]]/p[i])


    ans = l[k-1]
    for i in range(k,n):
        s = l[i] - l[i-k]
        ans = max(ans,s)
    print(ans)


if __name__=="__main__":
    main() import math math from math import gcd,pi,sqrt INF = float("inf") INF float("inf") float "inf" import sys sys sys.setrecursionlimit(10**6) sys.setrecursionlimit sys setrecursionlimit 10**6 10 6 import itertools itertools from collections import Counter,deque def i_input(): return int(input()) i_input def i_map(): return map(int, input().split()) i_map def i_list(): return list(i_map()) i_list i_input() for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) i_input() i_input def i_row(N): return [i_input() for _ in range(N)] i_row N N i_list() for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) i_list() i_list def i_row_list(N): return [i_list() for _ in range(N)] i_row_list N N def s_input(): return input() s_input def s_map(): return input().split() s_map def s_list(): return list(s_map()) s_list s_input for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) s_input def s_row(N): return [s_input for _ in range(N)] s_row N N s_list() for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) s_list() s_list def s_row_str(N): return [s_list() for _ in range(N)] s_row_str N N list(s_input()) for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) list(s_input()) list s_input() s_input def s_row_list(N): return [list(s_input()) for _ in range(N)] s_row_list N N def main():
    n, k = i_map()
    p = i_list()


    sowa = [0]
    for i in range(1,1001):
        sowa.append(sowa[i-1]+i)

    l = [sowa[p[0]]/p[0]]

    for i in range(1,n):
        l.append(l[i-1] + sowa[p[i]]/p[i])


    ans = l[k-1]
    for i in range(k,n):
        s = l[i] - l[i-k]
        ans = max(ans,s)
    print(ans) main n, k = i_map() n i_map() i_map k p = i_list() p i_list() i_list sowa = [0] sowa [0] 0 for i in range(1,1001):
        sowa.append(sowa[i-1]+i)

     i range(1,1001) range 1 1001 sowa.append(sowa[i-1]+i) sowa.append sowa append sowa[i-1]+i sowa[i-1] sowa i-1 i 1 i l = [sowa[p[0]]/p[0]] l [sowa[p[0]]/p[0]] sowa[p[0]]/p[0] sowa[p[0]] sowa p[0] p 0 p[0] p 0 for i in range(1,n):
        l.append(l[i-1] + sowa[p[i]]/p[i])


     i range(1,n) range 1 n l.append(l[i-1] + sowa[p[i]]/p[i]) l.append l append l[i-1] + sowa[p[i]]/p[i] l[i-1] l i-1 i 1 sowa[p[i]]/p[i] sowa[p[i]] sowa p[i] p i p[i] p i ans = l[k-1] ans l[k-1] l k-1 k 1 for i in range(k,n):
        s = l[i] - l[i-k]
        ans = max(ans,s)
     i range(k,n) range k n s = l[i] - l[i-k] s l[i] - l[i-k] l[i] l i l[i-k] l i-k i k ans = max(ans,s) ans max(ans,s) max ans s print(ans) print ans if __name__=="__main__":
    main() __name__=="__main__" __name__ "__main__" main() main def main():
    n, k = i_map()
    p = i_list()


    sowa = [0]
    for i in range(1,1001):
        sowa.append(sowa[i-1]+i)

    l = [sowa[p[0]]/p[0]]

    for i in range(1,n):
        l.append(l[i-1] + sowa[p[i]]/p[i])


    ans = l[k-1]
    for i in range(k,n):
        s = l[i] - l[i-k]
        ans = max(ans,s)
    print(ans) def main():
    n, k = i_map()
    p = i_list()


    sowa = [0]
    for i in range(1,1001):
        sowa.append(sowa[i-1]+i)

    l = [sowa[p[0]]/p[0]]

    for i in range(1,n):
        l.append(l[i-1] + sowa[p[i]]/p[i])


    ans = l[k-1]
    for i in range(k,n):
        s = l[i] - l[i-k]
        ans = max(ans,s)
    print(ans) main def i_input(): return int(input()) def i_input(): return int(input()) i_input def i_row_list(N): return [i_list() for _ in range(N)] def i_row_list(N): return [i_list() for _ in range(N)] i_row_list def i_list(): return list(i_map()) def i_list(): return list(i_map()) i_list def s_map(): return input().split() def s_map(): return input().split() s_map INF = float("inf") float("inf") INF def s_list(): return list(s_map()) def s_list(): return list(s_map()) s_list def i_row(N): return [i_input() for _ in range(N)] def i_row(N): return [i_input() for _ in range(N)] i_row def s_input(): return input() def s_input(): return input() s_input def s_row_str(N): return [s_list() for _ in range(N)] def s_row_str(N): return [s_list() for _ in range(N)] s_row_str def i_map(): return map(int, input().split()) def i_map(): return map(int, input().split()) i_map def s_row_list(N): return [list(s_input()) for _ in range(N)] def s_row_list(N): return [list(s_input()) for _ in range(N)] s_row_list def s_row(N): return [s_input for _ in range(N)] def s_row(N): return [s_input for _ in range(N)] s_row
import math
from math import gcd,pi,sqrt
INF = float("inf")

import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]


def main():
    n, k = i_map()
    p = i_list()


    sowa = [0]
    for i in range(1,1001):
        sowa.append(sowa[i-1]+i)

    l = [sowa[p[0]]/p[0]]

    for i in range(1,n):
        l.append(l[i-1] + sowa[p[i]]/p[i])


    ans = l[k-1]
    for i in range(k,n):
        s = l[i] - l[i-k]
        ans = max(ans,s)
    print(ans)


if __name__=="__main__":
    main()
