def divmult(n: int, m: int = 2) -> int:
    """
    Checks how many times n is divisible by m. Returns -1 if n=0

    @author = Joel

    :param n: Numerator
    :param m: Denominator
    :return: Multiplicity
    """
    if n < 0:
        raise ValueError('Only non-negative integers are supported for n.')
    elif n == 0:
        return -1
    q, r = divmod(n, m)
    count = 0
    while not r:
        count += 1
        q, r = divmod(q, m)
    return count