input: Write a function to calculate how many ways a 3 x n board can be filled entirely with 2 x 1 dominoes.
  assert count_ways(2) == 3
  assert count_ways(8) == 153
  assert count_ways(12) == 2131
output: def count_ways(n):
      if n % 2 != 0:
          return 0
      dp = [0] * (n + 1)
      dp[0] = 1
      dp[2] = 3
      for i in range(4, n + 1, 2):
          dp[i] = 4 * dp[i - 2] - dp[i - 4]
      return dp[n]