





'''simple docstring'''


class     lowerCAmelCase__ :

       '''simple docstring'''

       def __init__( self					:				Any       ,     a__					:				List[str]       ,     a__					:				str						):
              UpperCAmelCase  =						name
              UpperCAmelCase  =						val

       def __str__( self					:				Optional[Any]						):
              return f"{self.__class__.__name__}({self.name}, {self.val})"



       def __lt__( self					:				Union[str, Any]       ,     a__					:				Union[str, Any]						):
              return self.val < other.val






class     lowerCAmelCase__ :

       '''simple docstring'''

       def __init__( self					:				List[Any]       ,     a__					:				Union[str, Any]						):
              UpperCAmelCase  =						{}
              UpperCAmelCase  =						{}
              UpperCAmelCase  =						self.build_heap(a__						)

       def __getitem__( self					:				int       ,     a__					:				Any						):
              return self.get_value(a__						)

       def 			__snake_case      ( self					:				List[Any]       ,     a__					:				Optional[Any]						):
              return (idx - 1) // 2

       def 			__snake_case      ( self					:				str       ,     a__					:				Optional[int]						):
              return idx * 2 + 1

       def 			__snake_case      ( self					:				Optional[int]       ,     a__					:				Dict						):
              return idx * 2 + 2

       def 			__snake_case      ( self					:				int       ,     a__					:				Dict						):
              return self.heap_dict[key]

       def 			__snake_case      ( self					:				List[Any]       ,     a__					:				Optional[Any]						):
              UpperCAmelCase  =						len(a__						) - 1
              UpperCAmelCase  =						self.get_parent_idx(a__						)

              for idx, i in enumerate(a__						):
                     UpperCAmelCase  =						idx
                     UpperCAmelCase  =						i.val

              for i in range(a__       ,     -1       ,     -1						):
                     self.sift_down(a__       ,     a__						)
              return array

       def 			__snake_case      ( self					:				List[Any]       ,     a__					:				Optional[Any]       ,     a__					:				Optional[Any]						):
              while True:
                     UpperCAmelCase  =						self.get_left_child_idx(a__						)  # noqa: E741
                     UpperCAmelCase  =						self.get_right_child_idx(a__						)

                     UpperCAmelCase  =						idx
                     if l < len(a__						) and array[l] < array[idx]:
                            UpperCAmelCase  =						l
                     if r < len(a__						) and array[r] < array[smallest]:
                            UpperCAmelCase  =						r

                     if smallest != idx:
                            UpperCAmelCase,					UpperCAmelCase  =						array[smallest], array[idx]
                            (
                                (
                                UpperCAmelCase
                            ),					(
                                UpperCAmelCase
                            ),					
                            )  =						(
                                self.idx_of_element[array[smallest]],
                                self.idx_of_element[array[idx]],
                            )
                            UpperCAmelCase  =						smallest
                     else:
                            break

       def 			__snake_case      ( self					:				Union[str, Any]       ,     a__					:				Optional[int]						):
              UpperCAmelCase  =						self.get_parent_idx(a__						)
              while p >= 0 and self.heap[p] > self.heap[idx]:
                     UpperCAmelCase,					UpperCAmelCase  =						self.heap[idx], self.heap[p]
                     UpperCAmelCase,					UpperCAmelCase  =						(
                         self.idx_of_element[self.heap[idx]],
                         self.idx_of_element[self.heap[p]],
                     )
                     UpperCAmelCase  =						p
                     UpperCAmelCase  =						self.get_parent_idx(a__						)

       def 			__snake_case      ( self					:				Optional[Any]						):
              return self.heap[0]

       def 			__snake_case      ( self					:				List[str]						):
              UpperCAmelCase,					UpperCAmelCase  =						self.heap[-1], self.heap[0]
              UpperCAmelCase,					UpperCAmelCase  =						(
                  self.idx_of_element[self.heap[-1]],
                  self.idx_of_element[self.heap[0]],
              )

              UpperCAmelCase  =						self.heap.pop()
              del self.idx_of_element[x]
              self.sift_down(0       ,     self.heap						)
              return x

       def 			__snake_case      ( self					:				Optional[Any]       ,     a__					:				Optional[Any]						):
              self.heap.append(a__						)
              UpperCAmelCase  =						len(self.heap						) - 1
              UpperCAmelCase  =						node.val
              self.sift_up(len(self.heap						) - 1						)

       def 			__snake_case      ( self					:				Tuple						):
              return len(self.heap						) == 0



       def 			__snake_case      ( self					:				Any       ,     a__					:				List[Any]       ,     a__					:				int						):
              assert (
                  self.heap[self.idx_of_element[node]].val > new_value
              ), "newValue must be less that current value"
              UpperCAmelCase  =						new_value
              UpperCAmelCase  =						new_value
              self.sift_up(self.idx_of_element[node]						)


a__			:					List[Any]       						=						Node('R', -1)
a__			:					List[Any]       						=						Node('B', 6)
a__			:					Optional[Any]       						=						Node('A', 3)
a__			:					Any       						=						Node('X', 1)
a__			:					Any       						=						Node('E', 4)

# Use one of these two ways to generate Min-Heap

# Generating Min-Heap from array
a__			:					Dict       						=						MinHeap([r, b, a, x, e])

# Generating Min-Heap by Insert method
# myMinHeap.insert(a)
# myMinHeap.insert(b)
# myMinHeap.insert(x)
# myMinHeap.insert(r)
# myMinHeap.insert(e)

# Before
print('Min Heap - before decrease key')
for i in my_min_heap.heap:
    print(i)

print('Min Heap - After decrease key of node [B -> -17]')
my_min_heap.decrease_key(b, -17)

# After
for i in my_min_heap.heap:
    print(i)

if __name__ == "__main__":
    import doctest

    doctest.testmod()



"""simple docstring"""


from collections.abc import Generator






def      __UpperCAmelCase       (      ):







  """simple docstring"""
  _UpperCAmelCase			,					_UpperCAmelCase    			=   0, 1
  while True:
    _UpperCAmelCase			,					_UpperCAmelCase    			=   b, a + b
    yield b






def      __UpperCAmelCase       (      lowercase = 10_00		):







  """simple docstring"""
  _UpperCAmelCase    			=   1
  _UpperCAmelCase    			=   fibonacci_generator()
  while len(str(next(lowercase		)		)		) < n:
    answer += 1
  return answer + 1


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