This problem is a programming version of Problem 36 from projecteuler.net
The decimal number, (binary), is palindromic in both bases.
Find the sum of all natural numbers, less than , which are palindromic in base and base .
(Please note that the palindromic number, in either base, may not include leading zeros.)
Input contains two integers and .
Print the answer corresponding to the test case.
These numbers are palindromic in their decimal as well as base representation: . Their sum is