Count of integers up to N which represent a Binary number
Given an integer N, the task is to count every number i from 1 to N (both inclusive) such that i is a binary representation of some integer where N can be any value within the range[1, 109] Examples: Input: N = 100 Output: 4 Explanation: Valid integers are 1, 10, 11, 100 Input: N = 20 Output: 3 Expl