

class MovingAverage:
    def __init__(self, k: int, init_value: float) -> None:
        self.__k = k
        self.__values = [init_value] * k

    def update(self, value):
        self.__values.append(value)
        self.__values = self.__values[1:]

        return sum(self.__values) / self.__k