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++

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

some-alt