Determine the number of ways to completely cover an m \times n rectangle using dominoes that are each 3 \times 1 in size. Each domino must fit entirely within the rectangle, and no two dominoes can overlap. Dominoes may be placed either horizontally or vertically.
You will be given two integers, and , where 1 \leq m \leq 9 and 1 \leq n \leq 30.
Print the number of distinct ways to tile the m \times n rectangle using the dominoes.
Example 1