def num_of1_right(n: int) -> int:
    """
    Count quantity of 1 in the binary of the given int n.

    Parameters
    -----------
    n: int
        The given number.

    Returns
    ---------
    out: int
        The counts of 1 in the binary of the given number.

    Notes
    ------
    Pay attention to n < 0 case.
    O(len(n_of_binary))
    """
    count = 0
    if n < 0:
        n = -n
        # for the minus
        count = 1
    while n:
        if (n & 1):
            count += 1
        n = n >> 1
    return count