def is_woodall(x):
    if x <= 0 or x % 2 == 0:
        return False
    n = 1
    while (x + 1) % (2 ** n) == 0:
        if (x + 1) // (2 ** n) == n:
            return True
        n += 1
    return False