






from __future__ import annotations






def 	UpperCamelCase	(							snake_case__  : List[str]						,snake_case__  : int						,snake_case__  : int	):




     '''simple docstring'''






     if len(snake_case__	) == 0:
          raise ValueError("""find_max() arg is an empty sequence"""	)
     if (
         left >= len(snake_case__	)
         or left < -len(snake_case__	)
         or right >= len(snake_case__	)
         or right < -len(snake_case__	)
     ):
          raise IndexError("""list index out of range"""	)
     if left == right:
          return nums[left]
     __snake_case      :Dict 							=    (left + right) >> 1  # the middle
     __snake_case      :List[Any] 							=    find_max(snake_case__						,snake_case__						,snake_case__	)  # find max in range[left, mid]
     __snake_case      :int 							=    find_max(snake_case__						,mid + 1						,snake_case__	)  # find max in range[mid + 1, right]

     return left_max if left_max >= right_max else right_max


if __name__ == "__main__":
     import doctest

     doctest.testmod(verbose=True)









def  __magic_name__  (				lowercase = 1000				)				-> int:

							"""simple docstring"""



							lowercase_				,		lowercase_	:   Optional[Any]  				=     1, 1
							lowercase_	:   Tuple  				=     2
							while True:
														lowercase_	:   Dict  				=     0
														lowercase_	:   List[Any]  				=     fa + fa
														lowercase_				,		lowercase_	:   List[str]  				=     fa, f
														index += 1
														for _ in str(lowercase				):
																					i += 1
														if i == n:
																					break
							return index


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