
    Write a function to determine the number of possible student attendance patterns over two semesters, where each semester has n days and students are either present (1) or absent (0), such that the total number of days attended in the first semester equals the total number of days attended in the second semester.
    

    
def count_binary_seq(n):
    """
    Write a function to determine the number of possible student attendance patterns over two semesters, where each semester has n days and students are either present (1) or absent (0), such that the total number of days attended in the first semester equals the total number of days attended in the second semester.
    

    """
def count_binary_seq(n):
    """
    Write a function to determine the number of possible student attendance patterns over two semesters, where each semester has n days and students are either present (1) or absent (0), such that the total number of days attended in the first semester equals the total number of days attended in the second semester.
    

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