def count_Num(n):
    if n == 0:
        return 1
    if n == 1:
        return 1
    # Numbers where both bit 0 and bit n are set
    # Such numbers have the form: bit 0 set, bit n set, and bits 1 to n-1 can be anything
    # That gives 2^(n-1) numbers
    return 2 ** (n - 1)