Write a program that prints the number of sequences made up of exactly zeros and ones that are multiple of three when considered as a binary number. Note that numbers that begin with one or more zeros are allowed here.
For instance, there are 9 sequences for and :
Input consists of several pairs of natural numbers and , each between 0 and 30.
For every pair of and , print the required number.
Input
0 0 2 4 30 30
Output
1 9 39433695205465102