


'''simple docstring'''






from manim import *






class    __magic_name__				(						__UpperCamelCase							):






       def      lowerCAmelCase						(     self)		->    List[str]:




          '''simple docstring'''
          _UpperCAmelCase  :  Tuple				       =Rectangle(height=0.5    ,				width=0.5)
          _UpperCAmelCase  :  Optional[Any]				       =Rectangle(height=0.46    ,				width=0.46).set_stroke(width=0)

          _UpperCAmelCase  :  Tuple				       =[mem.copy() for i in range(6)]
          _UpperCAmelCase  :  Optional[Any]				       =[mem.copy() for i in range(6)]
          _UpperCAmelCase  :  Union[str, Any]				       =VGroup(*snake_case__).arrange(snake_case__    ,				buff=0)
          _UpperCAmelCase  :  Any				       =VGroup(*snake_case__).arrange(snake_case__    ,				buff=0)
          _UpperCAmelCase  :  int				       =VGroup(snake_case__    ,				snake_case__).arrange(snake_case__    ,				buff=0)
          _UpperCAmelCase  :  Optional[int]				       =Text('CPU'    ,				font_size=2_4)
          _UpperCAmelCase  :  str				       =Group(snake_case__    ,				snake_case__).arrange(snake_case__    ,				buff=0.5    ,				aligned_edge=snake_case__)
          cpu.move_to([-2.5, -0.5, 0])
          self.add(snake_case__)

          _UpperCAmelCase  :  Optional[int]				       =[mem.copy() for i in range(4)]
          _UpperCAmelCase  :  List[str]				       =VGroup(*snake_case__).arrange(snake_case__    ,				buff=0)
          _UpperCAmelCase  :  List[Any]				       =Text('GPU'    ,				font_size=2_4)
          _UpperCAmelCase  :  List[Any]				       =Group(snake_case__    ,				snake_case__).arrange(snake_case__    ,				buff=0.5    ,				aligned_edge=snake_case__)
          gpu.move_to([-1, -1, 0])
          self.add(snake_case__)

          _UpperCAmelCase  :  List[str]				       =[mem.copy() for i in range(6)]
          _UpperCAmelCase  :  Any				       =VGroup(*snake_case__).arrange(snake_case__    ,				buff=0)

          _UpperCAmelCase  :  int				       =Text('Model'    ,				font_size=2_4)
          _UpperCAmelCase  :  List[Any]				       =Group(snake_case__    ,				snake_case__).arrange(snake_case__    ,				buff=0.5    ,				aligned_edge=snake_case__)
          model.move_to([3, -1.0, 0])
          self.add(snake_case__)

          _UpperCAmelCase  :  str				       =[]
          for i, rect in enumerate(snake_case__):
             rect.set_stroke(snake_case__)
             # target = fill.copy().set_fill(YELLOW, opacity=0.7)
             # target.move_to(rect)
             # self.add(target)

             _UpperCAmelCase  :  str				       =Rectangle(height=0.46 / 4    ,				width=0.46 / 3).set_stroke(width=0.0).set_fill(snake_case__    ,				opacity=0.7)

             if i == 0:
                cpu_target.next_to(cpu_left_col_base[0].get_corner(DOWN + LEFT)    ,				buff=0.02    ,				direction=snake_case__)
                cpu_target.set_x(cpu_target.get_x() + 0.1)
             elif i == 3:
                cpu_target.next_to(cpu_targs[0]    ,				direction=snake_case__    ,				buff=0.0)
             else:
                cpu_target.next_to(cpu_targs[i - 1]    ,				direction=snake_case__    ,				buff=0.0)
             self.add(snake_case__)
             cpu_targs.append(snake_case__)

          _UpperCAmelCase  :  Any				       =[mem.copy() for i in range(6)]
          _UpperCAmelCase  :  str				       =VGroup(*snake_case__).arrange(snake_case__    ,				buff=0)

          _UpperCAmelCase  :  Any				       =Text('Loaded Checkpoint'    ,				font_size=2_4)
          _UpperCAmelCase  :  Union[str, Any]				       =Group(snake_case__    ,				snake_case__).arrange(snake_case__    ,				aligned_edge=snake_case__    ,				buff=0.4)
          checkpoint.move_to([3, 0.5, 0])

          _UpperCAmelCase  :  str				       =Square(side_length=2.2)
          key.move_to([-5, 2, 0])

          _UpperCAmelCase  :  Tuple				       =MarkupText(
              f"<b>Key:</b>\n\n<span fgcolor='{YELLOW}'>●</span> Empty Model"    ,				font_size=1_8    ,				)

          key_text.move_to([-5, 2.4, 0])

          self.add(snake_case__    ,				snake_case__)

          _UpperCAmelCase  :  Tuple				       =MarkupText(
              f"<span fgcolor='{BLUE}'>●</span> Checkpoint"    ,				font_size=1_8    ,				)

          blue_text.next_to(snake_case__    ,				DOWN * 2.4    ,				aligned_edge=key_text.get_left())

          _UpperCAmelCase  :  Optional[Any]				       =MarkupText(
              f"Next, a <i><span fgcolor=\"{BLUE}\">second</span></i> model is loaded into memory,\nwith the weights of a <span fgcolor=\"{BLUE}\">single shard</span>."    ,				font_size=2_4    ,				)
          step_a.move_to([2, 2, 0])
          self.play(Write(snake_case__)    ,				Write(snake_case__))

          self.play(Write(snake_case__    ,				run_time=1)    ,				Create(snake_case__    ,				run_time=1))

          _UpperCAmelCase  :  Tuple				       =[]
          _UpperCAmelCase  :  Optional[int]				       =[]
          for i, rect in enumerate(snake_case__):
             _UpperCAmelCase  :  int				       =fill.copy().set_fill(snake_case__    ,				opacity=0.7)
             target.move_to(snake_case__)
             first_animations.append(GrowFromCenter(snake_case__    ,				run_time=1))

             _UpperCAmelCase  :  str				       =target.copy()
             cpu_target.generate_target()
             if i < 5:
                cpu_target.target.move_to(cpu_left_col_base[i + 1])
             else:
                cpu_target.target.move_to(cpu_right_col_base[i - 5])
             second_animations.append(MoveToTarget(snake_case__    ,				run_time=1.5))

          self.play(*snake_case__)
          self.play(*snake_case__)
          self.wait()


"""simple docstring"""




from collections.abc import Generator







def 				_UpperCAmelCase		(							):





		"""simple docstring"""




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







def 				_UpperCAmelCase		(							lowerCamelCase__ = 1000  ):





		"""simple docstring"""




		lowerCAmelCase__   = 1
		lowerCAmelCase__   = fibonacci_generator()
		while len(str(next(lowerCamelCase__  )  )  ) < n:
				answer += 1
		return answer + 1


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




