
    Given a student's performance indicators across two equal semesters, where each semester has n binary metrics (1 for meeting criteria, 0 for not meeting), determine how many possible combinations exist where the total number of met criteria in the first semester equals the total number of met criteria in the second semester. Each combination represents a potential pattern of consistent student engagement across the academic year.
    

    
def count_binary_seq(n):
    """
    Given a student's performance indicators across two equal semesters, where each semester has n binary metrics (1 for meeting criteria, 0 for not meeting), determine how many possible combinations exist where the total number of met criteria in the first semester equals the total number of met criteria in the second semester. Each combination represents a potential pattern of consistent student engagement across the academic year.
    

    """
def count_binary_seq(n):
    """
    Given a student's performance indicators across two equal semesters, where each semester has n binary metrics (1 for meeting criteria, 0 for not meeting), determine how many possible combinations exist where the total number of met criteria in the first semester equals the total number of met criteria in the second semester. Each combination represents a potential pattern of consistent student engagement across the academic year.
    

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