"""simple docstring"""




from manim import *

class    a_   (  __UpperCamelCase      ):




					def     _SCREAMING_SNAKE_CASE    (						self    :  str  ):
							lowerCAmelCase__   = Rectangle(height=0.5	,    width=0.5  )
							lowerCAmelCase__   = Rectangle(height=0.46	,    width=0.46  ).set_stroke(width=0  )

							lowerCAmelCase__   = [mem.copy() for i in range(6  )]
							lowerCAmelCase__   = [mem.copy() for i in range(6  )]
							lowerCAmelCase__   = VGroup(*snake_case__  ).arrange(snake_case__	,    buff=0  )
							lowerCAmelCase__   = VGroup(*snake_case__  ).arrange(snake_case__	,    buff=0  )
							lowerCAmelCase__   = VGroup(snake_case__	,    snake_case__  ).arrange(snake_case__	,    buff=0  )
							lowerCAmelCase__   = Text("""CPU"""	,    font_size=24  )
							lowerCAmelCase__   = 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__  )

							lowerCAmelCase__   = [mem.copy() for i in range(4  )]
							lowerCAmelCase__   = VGroup(*snake_case__  ).arrange(snake_case__	,    buff=0  )
							lowerCAmelCase__   = Text("""GPU"""	,    font_size=24  )
							lowerCAmelCase__   = 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__  )

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

							lowerCAmelCase__   = Text("""Model"""	,    font_size=24  )
							lowerCAmelCase__   = 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__  )

							lowerCAmelCase__   = []
							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)

									lowerCAmelCase__   = 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__  )

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

							lowerCAmelCase__   = Text("""Loaded Checkpoint"""	,    font_size=24  )
							lowerCAmelCase__   = Group(snake_case__	,    snake_case__  ).arrange(snake_case__	,    aligned_edge=snake_case__	,    buff=0.4  )
							checkpoint.move_to([3, 0.5, 0]  )

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

							lowerCAmelCase__   = MarkupText(
							    F"""<b>Key:</b>\n\n<span fgcolor='{YELLOW}'>●</span> Empty Model"""	,    font_size=18	,    )

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

							self.add(snake_case__	,    snake_case__  )

							lowerCAmelCase__   = MarkupText(
							    F"""<span fgcolor='{BLUE}'>●</span> Checkpoint"""	,    font_size=18	,    )

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

							lowerCAmelCase__   = 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=24	,    )
							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  )  )

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

									lowerCAmelCase__   = 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())))




