def count_binary_seq(n):
    from math import comb
    result = sum(comb(n, i) ** 2 for i in range(n + 1))
    return result