#!/usr/bin/env python
from sys import stdin, argv

window = int(argv[1]) if len(argv) > 1 else 5
nums = []

# Pre-populate deque with first window of numbers
for n, num in zip(range(window), stdin):
    nums.append(int(num.rstrip()))

# Calculate initial sum and mean
total = sum(nums)
print(total/window)

# For each new number read, print the moving average
for num in stdin:
    total -= nums.pop(0)
    nums.append(int(num.rstrip()))
    total += nums[-1]
    print(total/window)
