Consider a series of numbers composed of only digits 4 and 7. The first few numbers in the series are 4, 7, 44, 47, 74, 77, 444, .. etc. Given a number constructed by 4, 7 digits only, we need to find the position of this number in this series.
Examples:
Input : 7
Output : pos = 2
Input : 444
Output : pos = 7
Find position of the given number among the numbers made of 4 and 7 : https://www.geeksforgeeks.org/find-position-given-number-among-numbers-made-4-7/