Problem1514--Hexadecimal's Numbers 十六进制?

1514: Hexadecimal's Numbers 十六进制?

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Submit

Description

输入n,输出1-n的自然数中各数位只包含0和1的数的个数

Input

整数n ,1<=n<=10^9

Output

符合条件的个数

Sample Input Copy

10

Sample Output Copy

2

Source/Category

深搜