code: def ackermann(m: int, n: int) -> int:
      
      while m >= 4:
          if n == 0:
              n = 1
          else:
              n = ackermann(m, n - 1)
          m -= 1
      if m == 3:
          return (1 << n + 3) - 3
      elif m == 2:
          return (n << 1) + 3
      elif m == 1:
          return n + 2
      else:
          return n + 1
docs: Ackermann number.