input: def fib4(n: int):
      """The Fib4 sequence resembles the Fibonacci sequence but it's described by the following rules:
      fib4(0) -> 0
      fib4(1) -> 0
      fib4(2) -> 2
      fib4(3) -> 0
      fib4(n) -> fib4(n-1) + fib4(n-2) + fib4(n-3) + fib4(n-4).
      Write a function to calculate the n-th term of the fib4 series without using recursion.
      >>> fib4(5)
      4
      >>> fib4(6)
      8
      >>> fib4(7)
      14
      """
output:     
      if n == 0:
          return 0
      elif n == 1:
          return 0
      elif n == 2:
          return 2
      elif n == 3:
          return 0
      
      fib_vals = [0, 0, 2, 0]
      
      for i in range(4, n + 1):
          next_val = fib_vals[-1] + fib_vals[-2] + fib_vals[-3] + fib_vals[-4]
          fib_vals.append(next_val)
          
      return fib_vals[n]
  