There's a simple rule that allows us to convert a number from the binary system to the decimal. For example, . To get out of , we need to follow simple steps. Firstly, number the digits of from right to left, starting with zero. Secondly, multiply each digit by two raised to the power accordingly. Here's how it looks:
As we see, only actually have importance in this expansion in powers.
In this task, you need to choose only powers of two that are used in the expansion in powers of each number.