(RankList for this Question)
Dexter in his laboratory was working on new numbers which he would call D-Numbers. D-number is a number which consists of only 1s and 2s. For eg - 1, 2, 12, 21 are D-numbers however 101, 72, 128 are not.
One fine day, DeDe walked into Dexter's lab and gave him a D-number \(X\) and asked him how many D-numbers exist which are smaller than the number \(X\). Can you help Dexter answer this question?
\(N\) is the count of D-numbers smaller than X.
There is no D-number which is smaller than 1.
The 5 D-numbers smaller than 22 are - 1, 2, 11, 12, 21.
Log In to solve the Question