
    Design an algorithm to determine the number of possible 2n-day patient admission patterns, where each day is marked as either high-volume (1) or low-volume (0), such that the total number of high-volume days in the first n days equals the total in the last n days. This analysis helps identify balanced hospital capacity utilization patterns that maintain consistent resource allocation across two consecutive periods.
    

    
def count_binary_seq(n):
    """
    Design an algorithm to determine the number of possible 2n-day patient admission patterns, where each day is marked as either high-volume (1) or low-volume (0), such that the total number of high-volume days in the first n days equals the total in the last n days. This analysis helps identify balanced hospital capacity utilization patterns that maintain consistent resource allocation across two consecutive periods.
    

    """
def count_binary_seq(n):
    """
    Design an algorithm to determine the number of possible 2n-day patient admission patterns, where each day is marked as either high-volume (1) or low-volume (0), such that the total number of high-volume days in the first n days equals the total in the last n days. This analysis helps identify balanced hospital capacity utilization patterns that maintain consistent resource allocation across two consecutive periods.
    

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