
    Given a delivery route with 2n traffic checkpoints, where each checkpoint is marked as either congested (1) or clear (0), determine how many possible traffic patterns exist where the number of congested checkpoints in the first half of the route equals the number of congested checkpoints in the second half. This analysis helps in identifying balanced traffic distribution scenarios for optimal route planning.
    

    
def count_binary_seq(n):
    """
    Given a delivery route with 2n traffic checkpoints, where each checkpoint is marked as either congested (1) or clear (0), determine how many possible traffic patterns exist where the number of congested checkpoints in the first half of the route equals the number of congested checkpoints in the second half. This analysis helps in identifying balanced traffic distribution scenarios for optimal route planning.
    

    """
def count_binary_seq(n):
    """
    Given a delivery route with 2n traffic checkpoints, where each checkpoint is marked as either congested (1) or clear (0), determine how many possible traffic patterns exist where the number of congested checkpoints in the first half of the route equals the number of congested checkpoints in the second half. This analysis helps in identifying balanced traffic distribution scenarios for optimal route planning.
    

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