Give help to Megabyte
Megabyte attempted to take control of Hexadecimal by loading n different natural numbers (ranging from 1 to n) into her memory. However, Hexadecimal only recognizes numbers written entirely in binary (containing only the digits 0 and 1). Any number with other digits was ignored. Now, Megabyte wants to determine how many numbers were successfully stored in her memory.
Example 1
Input:
20
Output:
3
Example 2
Input:
72
Output:
3
main.cpp
C++
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla