
    Given a day divided into 2n time slots where each slot is marked as either high (1) or low (0) traffic density, determine how many possible daily traffic patterns exist where the total number of high-traffic slots in the first half of the day equals the total number of high-traffic slots in the second half of the day. The traffic pattern analysis helps in balancing bus route schedules between morning and evening periods.
    

    
def count_binary_seq(n):
    """
    Given a day divided into 2n time slots where each slot is marked as either high (1) or low (0) traffic density, determine how many possible daily traffic patterns exist where the total number of high-traffic slots in the first half of the day equals the total number of high-traffic slots in the second half of the day. The traffic pattern analysis helps in balancing bus route schedules between morning and evening periods.
    

    """
def count_binary_seq(n):
    """
    Given a day divided into 2n time slots where each slot is marked as either high (1) or low (0) traffic density, determine how many possible daily traffic patterns exist where the total number of high-traffic slots in the first half of the day equals the total number of high-traffic slots in the second half of the day. The traffic pattern analysis helps in balancing bus route schedules between morning and evening periods.
    

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