def toNearest(n, res):
    """
    :param n: Number
    :param res: Resolution
    :return: Number rounded up to the closest multiplicate of res
    """
    if n % res == 0:
        return n
    return (n // res + 1) * res