
    Given a credit card transaction's security flag status represented as a binary number, where each bit indicates whether a specific fraud detection rule has been checked (1) or not (0), write a function to activate the first unchecked security rule by setting its corresponding bit to 1. The function should identify and set the leftmost 0 bit to 1, representing the activation of the earliest pending security check in the sequence.
    

    
def set_left_most_unset_bit(n):
    """
    Given a credit card transaction's security flag status represented as a binary number, where each bit indicates whether a specific fraud detection rule has been checked (1) or not (0), write a function to activate the first unchecked security rule by setting its corresponding bit to 1. The function should identify and set the leftmost 0 bit to 1, representing the activation of the earliest pending security check in the sequence.
    

    """
def set_left_most_unset_bit(n):
    """
    Given a credit card transaction's security flag status represented as a binary number, where each bit indicates whether a specific fraud detection rule has been checked (1) or not (0), write a function to activate the first unchecked security rule by setting its corresponding bit to 1. The function should identify and set the leftmost 0 bit to 1, representing the activation of the earliest pending security check in the sequence.
    

    """
    if not n & n + 1:
        return n
    (pos, temp, count) = (0, n, 0)
    while temp:
        if not temp & 1:
            pos = count
        count += 1
        temp >>= 1
    return n | 1 << pos