PROGRAMMING:Class a number
A binary number, if the number of 1 is more than the number of 0, is called class a number, otherwise it is called non class a number. For example, 10011000 are non class a numbers, 1101 and 1111000 are class a numbers.
The corresponding binary numbers within 16 are class a numbers: 1, 3, 5, 6, 7, 11, 13, 14, 15. So there are nine a-numbers in 16.
For a given integer, find how many class a numbers there are in the range of the integer.
###Input format:
Enter some positive integers n (n < = 400000), one number per line. End the input with ^ Z or file terminator.
###Output format:
Output the number of class a numbers in the corresponding integer range. One number per line. At the end of the output line break.
###Input example:
Here is a set of inputs. For example:
```in
sixteen
twenty
```
###Output example:
The corresponding output is given here. For example:
```out
nine
ten
```
answer:If there is no answer, please comment
The corresponding binary numbers within 16 are class a numbers: 1, 3, 5, 6, 7, 11, 13, 14, 15. So there are nine a-numbers in 16.
For a given integer, find how many class a numbers there are in the range of the integer.
###Input format:
Enter some positive integers n (n < = 400000), one number per line. End the input with ^ Z or file terminator.
###Output format:
Output the number of class a numbers in the corresponding integer range. One number per line. At the end of the output line break.
###Input example:
Here is a set of inputs. For example:
```in
sixteen
twenty
```
###Output example:
The corresponding output is given here. For example:
```out
nine
ten
```
answer:If there is no answer, please comment