
    Given a time block of 2n hours in the emergency room, determine how many possible patient volume patterns exist where the total number of high-volume hours in the first n hours equals the total number of high-volume hours in the last n hours. Each hour is classified as either high-volume (1) or low-volume (0), and this information is used to optimize staff scheduling across equal shift periods.
    

    
def count_binary_seq(n):
    """
    Given a time block of 2n hours in the emergency room, determine how many possible patient volume patterns exist where the total number of high-volume hours in the first n hours equals the total number of high-volume hours in the last n hours. Each hour is classified as either high-volume (1) or low-volume (0), and this information is used to optimize staff scheduling across equal shift periods.
    

    """
def count_binary_seq(n):
    """
    Given a time block of 2n hours in the emergency room, determine how many possible patient volume patterns exist where the total number of high-volume hours in the first n hours equals the total number of high-volume hours in the last n hours. Each hour is classified as either high-volume (1) or low-volume (0), and this information is used to optimize staff scheduling across equal shift periods.
    

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