🔥Beats 100 % 🔥 || Easiest Solution ✔️ || JAVA || 
IntuitionThe problem revolves around finding the smallest number greater than or equal to a given number n where the binary representation of the number contain
# Intuition
*The problem revolves around finding the smallest number greater than or equal to a given number n where the binary representation of the number contains only 1s.*

# Approach
1. Determine the number of bits b needed to represent n.
2. Calculate the result as Math.pow(2,b)-1. 
# Complexity
- Time complexity:
O(log n)

- Space complexity:
O(1)

# Code
```java []
class Solution {
    public int smallestNumber(int n) {
        int count=0;
        while(n > 0){
            count++;
            n=n>>1;
        }
        return (int)Math.pow(2,count)-1;
    }
}
```
['Math', 'Bit Manipulation', 'Java']