def is_power_of_two(n):
    # Check if n is a positive integer and if it is a power of two
    if n <= 0:
        return False
    return (n & (n - 1)) == 0

# Example usage
print(is_power_of_two(1))   # Output: True
print(is_power_of_two(16))  # Output: True
print(is_power_of_two(3))   # Output: False
