def low_bit(S): 
    """
    Returns the position of the first bit 1 from the least significant part.

    >>> low_bit(0b100101)
    0
    >>> low_bit(0b100100)
    2
    >>> low_bit(1 << 5)
    5

    """
    return (S & (-S)).bit_length() - 1