one liner
Intuitionlongest number possible is the length of the bitsApproachchange all 0s in bits to 1Complexity
Time complexity: O(1)

Space complexity: O(1)
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
longest number possible is the length of the bits
# Approach
<!-- Describe your approach to solving the problem. -->
change all 0s in bits to 1

# Complexity
- Time complexity: O(1)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity: O(1)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```python3 []
class Solution:
    def smallestNumber(self, n: int) -> int:
        return int("1"*len(str(bin(n))[2:]),2)
```
['Math', 'Bit Manipulation', 'Python3']