Swift, Beats 100.00%, bit << 1 + | 1 

```swift []
class Solution {
    func smallestNumber(_ n: Int) -> Int {
        var ans = 1
        while ans < n {
            ans = ans << 1 | 1
        }
        return ans 
    }
}
```
['Swift']