def HammingOrder(n):
    """Gives you the order of the Hamming gate as a function of n

    Args:
        n (int): lenght of the input message

    Returns:
        N (int): order of the Hamming gate
    """
    for i in range(0,15):
        N=2**i
        if N-i-1>=n: return i