


from collections.abc import Generator






def  UpperCamelCase					(	)   ->  Generator[int, None, None]:
		"""simple docstring"""




		lowercase__			,	lowercase__     			=		0, 1
		while True:
				lowercase__			,	lowercase__     			=		b, a + b
				yield b






def  UpperCamelCase					(	__magic_name__     :							int = 1000     )   ->  int:
		"""simple docstring"""




		lowercase__     			=		1
		lowercase__     			=		fibonacci_generator()
		while len(str(next(snake_case_     )     )     ) < n:
				answer += 1
		return answer + 1


if __name__ == "__main__":
	print(solution(int(str(input()).strip())))


'''simple docstring'''





from __future__ import annotations

import queue




class        __A      :



    def __init__(self    :    Optional[Any]   ,			__a    :    str ):
         UpperCAmelCase_           =   data
         UpperCAmelCase_           =   None
         UpperCAmelCase_           =   None





def 	lowerCAmelCase_				(					)    ->      TreeNode:


     '''simple docstring'''




     print("\n********Press N to stop entering at any point of time********\n"			)
     UpperCAmelCase_           =   input("Enter the value of the root node: "			).strip().lower()
     UpperCAmelCase_           =   queue.Queue()
     UpperCAmelCase_           =   TreeNode(int(snake_case_			)			)
     q.put(snake_case_			)
     while not q.empty():
          UpperCAmelCase_           =   q.get()
          UpperCAmelCase_           =   f"""Enter the left node of {node_found.data}: """
          UpperCAmelCase_           =   input(snake_case_			).strip().lower() or "n"
          if check == "n":
               return tree_node
          UpperCAmelCase_           =   TreeNode(int(snake_case_			)			)
          UpperCAmelCase_           =   left_node
          q.put(snake_case_			)
          UpperCAmelCase_           =   f"""Enter the right node of {node_found.data}: """
          UpperCAmelCase_           =   input(snake_case_			).strip().lower() or "n"
          if check == "n":
               return tree_node
          UpperCAmelCase_           =   TreeNode(int(snake_case_			)			)
          UpperCAmelCase_           =   right_node
          q.put(snake_case_			)
     raise





def 	lowerCAmelCase_				(					snake_case_       : TreeNode			)    ->      None:


     '''simple docstring'''




     if not isinstance(snake_case_					,    snake_case_			) or not node:
          return
     print(node.data					,    end=","			)
     pre_order(node.left			)
     pre_order(node.right			)





def 	lowerCAmelCase_				(					snake_case_       : TreeNode			)    ->      None:


     '''simple docstring'''




     if not isinstance(snake_case_					,    snake_case_			) or not node:
          return
     in_order(node.left			)
     print(node.data					,    end=","			)
     in_order(node.right			)





def 	lowerCAmelCase_				(					snake_case_       : TreeNode			)    ->      None:


     '''simple docstring'''




     if not isinstance(snake_case_					,    snake_case_			) or not node:
          return
     post_order(node.left			)
     post_order(node.right			)
     print(node.data					,    end=","			)





def 	lowerCAmelCase_				(					snake_case_       : TreeNode			)    ->      None:


     '''simple docstring'''




     if not isinstance(snake_case_					,    snake_case_			) or not node:
          return
     UpperCAmelCase_           =   queue.Queue()
     q.put(snake_case_			)
     while not q.empty():
          UpperCAmelCase_           =   q.get()
          print(node_dequeued.data					,    end=","			)
          if node_dequeued.left:
               q.put(node_dequeued.left			)
          if node_dequeued.right:
               q.put(node_dequeued.right			)





def 	lowerCAmelCase_				(					snake_case_       : TreeNode			)    ->      None:


     '''simple docstring'''




     if not isinstance(snake_case_					,    snake_case_			) or not node:
          return
     UpperCAmelCase_           =   queue.Queue()
     q.put(snake_case_			)
     while not q.empty():
          UpperCAmelCase_           =   []
          while not q.empty():
               UpperCAmelCase_           =   q.get()
               print(node_dequeued.data					,    end=","			)
               if node_dequeued.left:
                    list_.append(node_dequeued.left			)
               if node_dequeued.right:
                    list_.append(node_dequeued.right			)
          print()
          for node in list_:
               q.put(snake_case_			)





def 	lowerCAmelCase_				(					snake_case_       : TreeNode			)    ->      None:


     '''simple docstring'''




     if not isinstance(snake_case_					,    snake_case_			) or not node:
          return
     UpperCAmelCase_           =   []
     UpperCAmelCase_           =   node
     while n or stack:
          while n:  # start from root node, find its left child
               print(n.data					,    end=","			)
               stack.append(snake_case_			)
               UpperCAmelCase_           =   n.left
          # end of while means current node doesn't have left child
          UpperCAmelCase_           =   stack.pop()
          # start to traverse its right child
          UpperCAmelCase_           =   n.right





def 	lowerCAmelCase_				(					snake_case_       : TreeNode			)    ->      None:


     '''simple docstring'''




     if not isinstance(snake_case_					,    snake_case_			) or not node:
          return
     UpperCAmelCase_           =   []
     UpperCAmelCase_           =   node
     while n or stack:
          while n:
               stack.append(snake_case_			)
               UpperCAmelCase_           =   n.left
          UpperCAmelCase_           =   stack.pop()
          print(n.data					,    end=","			)
          UpperCAmelCase_           =   n.right





def 	lowerCAmelCase_				(					snake_case_       : TreeNode			)    ->      None:


     '''simple docstring'''




     if not isinstance(snake_case_					,    snake_case_			) or not node:
          return
     UpperCAmelCase_    , UpperCAmelCase_           =   [], []
     UpperCAmelCase_           =   node
     stacka.append(snake_case_			)
     while stacka:  # to find the reversed order of post order, store it in stack2
          UpperCAmelCase_           =   stacka.pop()
          if n.left:
               stacka.append(n.left			)
          if n.right:
               stacka.append(n.right			)
          stacka.append(snake_case_			)
     while stacka:  # pop up from stack2 will be the post order
          print(stacka.pop().data					,    end=","			)





def 	lowerCAmelCase_				(					snake_case_       : str = ""					,    snake_case_       : Any=50					,    snake_case_       : Union[str, Any]="*"			)    ->      str:


     '''simple docstring'''




     if not s:
          return "\n" + width * char
     UpperCAmelCase_    , UpperCAmelCase_           =   divmod(width - len(snake_case_			) - 2					,    2			)
     return f"""{left * char} {s} {(left + extra) * char}"""


if __name__ == "__main__":
    import doctest

    doctest.testmod()
    print(prompt('Binary Tree Traversals'))

    SCREAMING_SNAKE_CASE_:     TreeNode  =build_tree()
    print(prompt('Pre Order Traversal'))
    pre_order(node)
    print(prompt() + '\n')

    print(prompt('In Order Traversal'))
    in_order(node)
    print(prompt() + '\n')

    print(prompt('Post Order Traversal'))
    post_order(node)
    print(prompt() + '\n')

    print(prompt('Level Order Traversal'))
    level_order(node)
    print(prompt() + '\n')

    print(prompt('Actual Level Order Traversal'))
    level_order_actual(node)
    print('*' * 50 + '\n')

    print(prompt('Pre Order Traversal - Iteration Version'))
    pre_order_iter(node)
    print(prompt() + '\n')

    print(prompt('In Order Traversal - Iteration Version'))
    in_order_iter(node)
    print(prompt() + '\n')

    print(prompt('Post Order Traversal - Iteration Version'))
    post_order_iter(node)
    print(prompt())




