output_description: Print the number of integer sequences that satisfy the condition.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      A_1 A_2 ... A_N
attempt: n = int(input())
  li = list(map(int, input().split()))
  lee = len(li)
  base = 1
  for l in li:
      if l % 2 == 0:
          base *= 2
  print(3**lee - base)
  
problem_description: Statement
  
  We will say that two integer sequences of length N, x_1, x_2, ..., x_N and
  y_1, y_2, ..., y_N, are _similar_ when |x_i - y_i| \leq 1 holds for all i (1
  \leq i \leq N).
  
  In particular, any integer sequence is similar to itself.
  
  You are given an integer N and an integer sequence of length N, A_1, A_2, ...,
  A_N.
  
  How many integer sequences b_1, b_2, ..., b_N are there such that b_1, b_2,
  ..., b_N is similar to A and the product of all elements, b_1 b_2 ... b_N, is
  even?
samples: [{"input": "2\n    2 3", "output": "7\n    \n\nThere are seven integer sequences that satisfy the condition:\n\n  * 1, 2\n  * 1, 4\n  * 2, 2\n  * 2, 3\n  * 2, 4\n  * 3, 2\n  * 3, 4\n\n* * *"}, {"input": "3\n    3 3 3", "output": "26\n    \n\n* * *"}, {"input": "1\n    100", "output": "1\n    \n\n* * *"}, {"input": "10\n    90 52 56 71 44 8 13 30 57 84", "output": "58921"}]