def round_nearest_multiple(value: int, factor: int, headroom: int = 0) -> int:
    """ Round value to nearest multiple given a factor

    :param int value: starting value
    :param int factor: factor to use in finding multiple
    :param int headroom: ensure this much difference between value and result
    :return: rounded value
    """
    return factor * ((value + headroom) // factor + 1)