def main():
    """"ここに今までのコード"""
    N, K = map(int, input().split())
    dice_list = list(map(int, input().split()))
    max, s = 0, 0

    for i in range(K):
        s += (dice_list[i] + 1) / 2
    
    max = s

    for i in range(N-K):
        s -= (dice_list[i] + 1) / 2
        s += (dice_list[i+K] + 1) / 2
        if s > max:
            max = s
    
    print(max)


if __name__ == '__main__':
    main() def main():
    """"ここに今までのコード"""
    N, K = map(int, input().split())
    dice_list = list(map(int, input().split()))
    max, s = 0, 0

    for i in range(K):
        s += (dice_list[i] + 1) / 2
    
    max = s

    for i in range(N-K):
        s -= (dice_list[i] + 1) / 2
        s += (dice_list[i+K] + 1) / 2
        if s > max:
            max = s
    
    print(max) main """"ここに今までのコード""" N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K dice_list = list(map(int, input().split())) dice_list list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split max, s = 0, 0 max 0 s 0 for i in range(K):
        s += (dice_list[i] + 1) / 2
    
     i range(K) range K s += (dice_list[i] + 1) / 2 s (dice_list[i] + 1) / 2 dice_list[i] + 1 dice_list[i] dice_list i 1 2 max = s max s for i in range(N-K):
        s -= (dice_list[i] + 1) / 2
        s += (dice_list[i+K] + 1) / 2
        if s > max:
            max = s
    
     i range(N-K) range N-K N K s -= (dice_list[i] + 1) / 2 s (dice_list[i] + 1) / 2 dice_list[i] + 1 dice_list[i] dice_list i 1 2 s += (dice_list[i+K] + 1) / 2 s (dice_list[i+K] + 1) / 2 dice_list[i+K] + 1 dice_list[i+K] dice_list i+K i K 1 2 if s > max:
            max = s
    
     s > max s max max = s max s print(max) print max if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    """"ここに今までのコード"""
    N, K = map(int, input().split())
    dice_list = list(map(int, input().split()))
    max, s = 0, 0

    for i in range(K):
        s += (dice_list[i] + 1) / 2
    
    max = s

    for i in range(N-K):
        s -= (dice_list[i] + 1) / 2
        s += (dice_list[i+K] + 1) / 2
        if s > max:
            max = s
    
    print(max) def main():
    """"ここに今までのコード"""
    N, K = map(int, input().split())
    dice_list = list(map(int, input().split()))
    max, s = 0, 0

    for i in range(K):
        s += (dice_list[i] + 1) / 2
    
    max = s

    for i in range(N-K):
        s -= (dice_list[i] + 1) / 2
        s += (dice_list[i+K] + 1) / 2
        if s > max:
            max = s
    
    print(max) main
def main():
    """"ここに今までのコード"""
    N, K = map(int, input().split())
    dice_list = list(map(int, input().split()))
    max, s = 0, 0

    for i in range(K):
        s += (dice_list[i] + 1) / 2
    
    max = s

    for i in range(N-K):
        s -= (dice_list[i] + 1) / 2
        s += (dice_list[i+K] + 1) / 2
        if s > max:
            max = s
    
    print(max)


if __name__ == '__main__':
    main()