def abc154d_dice_in_line():
    n, k = map(int, input().split())
    p = list(map(lambda x: (int(x)+1)*(int(x)/2)/int(x), input().split()))
    ans = sum(p[0:k])
    val = ans
    for i in range(k, len(p)):
        val = val - p[i-k] + p[i]
        ans = max(ans, val)
    print(ans)
abc154d_dice_in_line() def abc154d_dice_in_line():
    n, k = map(int, input().split())
    p = list(map(lambda x: (int(x)+1)*(int(x)/2)/int(x), input().split()))
    ans = sum(p[0:k])
    val = ans
    for i in range(k, len(p)):
        val = val - p[i-k] + p[i]
        ans = max(ans, val)
    print(ans) abc154d_dice_in_line n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k p = list(map(lambda x: (int(x)+1)*(int(x)/2)/int(x), input().split())) p list(map(lambda x: (int(x)+1)*(int(x)/2)/int(x), input().split())) list map(lambda x: (int(x)+1)*(int(x)/2)/int(x), input().split()) map lambda x: (int(x)+1)*(int(x)/2)/int(x) (int(x)+1)*(int(x)/2)/int(x) (int(x)+1)*(int(x)/2) int(x)+1 int(x) int x 1 int(x)/2 int(x) int x 2 int(x) int x x input().split() ().split () input split ans = sum(p[0:k]) ans sum(p[0:k]) sum p[0:k] p 0:k 0 k val = ans val ans for i in range(k, len(p)):
        val = val - p[i-k] + p[i]
        ans = max(ans, val)
     i range(k, len(p)) range k len(p) len p val = val - p[i-k] + p[i] val val - p[i-k] + p[i] val - p[i-k] val p[i-k] p i-k i k p[i] p i ans = max(ans, val) ans max(ans, val) max ans val print(ans) print ans abc154d_dice_in_line() abc154d_dice_in_line def abc154d_dice_in_line():
    n, k = map(int, input().split())
    p = list(map(lambda x: (int(x)+1)*(int(x)/2)/int(x), input().split()))
    ans = sum(p[0:k])
    val = ans
    for i in range(k, len(p)):
        val = val - p[i-k] + p[i]
        ans = max(ans, val)
    print(ans) def abc154d_dice_in_line():
    n, k = map(int, input().split())
    p = list(map(lambda x: (int(x)+1)*(int(x)/2)/int(x), input().split()))
    ans = sum(p[0:k])
    val = ans
    for i in range(k, len(p)):
        val = val - p[i-k] + p[i]
        ans = max(ans, val)
    print(ans) abc154d_dice_in_line
def abc154d_dice_in_line():
    n, k = map(int, input().split())
    p = list(map(lambda x: (int(x)+1)*(int(x)/2)/int(x), input().split()))
    ans = sum(p[0:k])
    val = ans
    for i in range(k, len(p)):
        val = val - p[i-k] + p[i]
        ans = max(ans, val)
    print(ans)
abc154d_dice_in_line()