def bit_first(x):
    """Get the first digit where 1 stands(0-indexed)

    Args:
        x (int): bit

    Returns:
        int: first digit
    >>> bit_first(1)
    0
    >>> bit_first(4)
    2
    >>> bit_first(6)
    2
    >>> bit_first(0b1011000)
    6
    """
    return x.bit_length() - 1