✅ C++ Simple Code ✅
\n\n# Code\ncpp []\nclass Solution {\npublic:\n    int smallestNumber(int n) {\n        int ans = log2(n);\n        return pow(2, (ans + 1)) - 1; \n    }\n};\n
\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int smallestNumber(int n) {\n        int ans = log2(n);\n        return pow(2, (ans + 1)) - 1; \n    }\n};\n```
['Math', 'Bit Manipulation', 'C++']