def data_bits(n: int = 2):
    """
    Calculate the data bits in one hamming data block.

    :param n: The dimension of the hamming data block is specified by 2 ** n or n << 1
    :return: The number of valid data bits carrying information in one hamming data block.
    """

    return (1 << 2 * n) - (n << 1) - 1