
    Write a function to determine how many possible credit behavior patterns exist over 2n months where the number of positive credit actions in the first n months exactly matches the number of positive actions in the last n months, with each month being marked as either positive (1) or negative (0) for credit behavior.
    

    
def count_binary_seq(n):
    """
    Write a function to determine how many possible credit behavior patterns exist over 2n months where the number of positive credit actions in the first n months exactly matches the number of positive actions in the last n months, with each month being marked as either positive (1) or negative (0) for credit behavior.
    

    """
def count_binary_seq(n):
    """
    Write a function to determine how many possible credit behavior patterns exist over 2n months where the number of positive credit actions in the first n months exactly matches the number of positive actions in the last n months, with each month being marked as either positive (1) or negative (0) for credit behavior.
    

    """
    nCr = 1
    res = 1
    for r in range(1, n + 1):
        nCr = nCr * (n + 1 - r) / r
        res += nCr * nCr
    return res