Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.

book
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

main.cpp

C++

Fråga AI

expand

Fråga AI

ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

some-alt