"""simple docstring"""
from __future__ import annotations

from typing import Generic, TypeVar

lowercase__   			=      TypeVar('T')




class   __snake_case			(	Generic[T]							):



      def __init__(		self       ,     lowercase)      ->     Union[str, Any]:





        '''simple docstring'''





        a__:	Union[str, Any]     				=      data  # Assign data
        a__:	Node[T] | None     				=      None  # Initialize next as null
        a__:	Node[T] | None     				=      None  # Initialize prev as null







class   __snake_case			(	Generic[T]							):



      def __init__(		self)      ->     None:





        '''simple docstring'''





        a__:	Node[T] | None     				=      None



      def     lowerCamelCase_  (		self       ,     lowercase)      ->     None:





        '''simple docstring'''





        if self.head is None:
          a__:	List[Any]     				=      Node(lowercase)
        else:
          a__:	Any     				=      Node(lowercase)
          a__:	Union[str, Any]     				=      new_node
          a__:	Union[str, Any]     				=      self.head
          a__:	List[Any]     				=      None
          a__:	Union[str, Any]     				=      new_node



      def     lowerCamelCase_  (		self)      ->     T | None:





        '''simple docstring'''





        if self.head is None:
          return None
        else:
          assert self.head is not None
          a__:	List[Any]     				=      self.head.data
          a__:	str     				=      self.head.next
          if self.head is not None:
            a__:	Optional[Any]     				=      None
          return temp



      def     lowerCamelCase_  (		self)      ->     T | None:





        '''simple docstring'''





        return self.head.data if self.head is not None else None



      def __len__(		self)      ->     int:





        '''simple docstring'''





        a__:	Any     				=      self.head
        a__:	Any     				=      0
        while temp is not None:
          count += 1
          a__:	Optional[int]     				=      temp.next
        return count



      def     lowerCamelCase_  (		self)      ->     bool:





        '''simple docstring'''





        return self.head is None



      def     lowerCamelCase_  (		self)      ->     None:





        '''simple docstring'''





        print('stack elements are:')
        a__:	str     				=      self.head
        while temp is not None:
          print(temp.data       ,     end='->')
          a__:	List[str]     				=      temp.next


# Code execution starts here
if __name__ == "__main__":
 # Start with the empty stack
 lowercase__   			=      Stack()

 # Insert 4 at the beginning. So stack becomes 4->None
 print('Stack operations using Doubly LinkedList')
 stack.push(4)

 # Insert 5 at the beginning. So stack becomes 4->5->None
 stack.push(5)

 # Insert 6 at the beginning. So stack becomes 4->5->6->None
 stack.push(6)

 # Insert 7 at the beginning. So stack becomes 4->5->6->7->None
 stack.push(7)

 # Print the stack
 stack.print_stack()

 # Print the top element
 print('\nTop element is ', stack.top())

 # Print the stack size
 print('Size of the stack is ', len(stack))

 # pop the top element
 stack.pop()

 # pop the top element
 stack.pop()

 # two elements have now been popped off
 stack.print_stack()

 # Print True if the stack is empty else False
 print('\nstack is empty:', stack.is_empty())



"""simple docstring"""
from __future__ import annotations

import sys







def 		__a  (      _SCREAMING_SNAKE_CASE  )      ->int:
  if n < 0:
    raise ValueError('Negative arguments are not supported'  )
  return _fib(_SCREAMING_SNAKE_CASE  )[0]







def 		__a  (      _SCREAMING_SNAKE_CASE  )      ->tuple[int, int]:
  if n == 0:  # (F(0), F(1))
    return (0, 1)

  # F(2n) = F(n)[2F(n+1) − F(n)]
  # F(2n+1) = F(n+1)^2+F(n)^2
  a__				,       a__:	Optional[int]     				=      _fib(n // 2  )
  a__:	List[str]     				=      a * (b * 2 - a)
  a__:	Dict     				=      a * a + b * b
  return (d, c + d) if n % 2 else (c, d)


if __name__ == "__main__":
 lowercase__   			=      int(sys.argv[1])
 print(f"fibonacci({n}) is {fibonacci(n)}")


