code: 
  """simple docstring"""
  
  
  
  
  
  
  
  class     __a			:
  
  
  
  
  
  
  
         def __init__(					self							,lowerCamelCase_		):
  
  
  
            '''simple docstring'''
  
            _UpperCAmelCase   	=					data
            _UpperCAmelCase   	=					None
            _UpperCAmelCase   	=					None
  
  
  
  
  
  
  
         def __str__(					self		):
  
  
  
            '''simple docstring'''
  
            return f'''{self.data}'''
  
  
  
  
  
  
  class     __a			:
  
  
  
  
  
  
  
         def __init__(					self		):
  
  
  
            '''simple docstring'''
  
            _UpperCAmelCase   	=					None
            _UpperCAmelCase   	=					None
  
  
  
  
  
  
  
         def __iter__(					self		):
  
  
  
            '''simple docstring'''
  
            _UpperCAmelCase   	=					self.head
            while node:
               yield node.data
               _UpperCAmelCase   	=					node.next
  
  
  
  
  
  
  
         def __str__(					self		):
  
  
  
            '''simple docstring'''
  
            return "->".join([str(lowerCamelCase_		) for item in self]		)
  
  
  
  
  
  
  
         def __len__(					self		):
  
  
  
            '''simple docstring'''
  
            return sum(1 for _ in self		)
  
  
  
  
  
  
  
         def    _snake_case			(					self							,lowerCamelCase_		):
  
  
  
            '''simple docstring'''
  
            self.insert_at_nth(0							,lowerCamelCase_		)
  
  
  
  
  
  
  
         def    _snake_case			(					self							,lowerCamelCase_		):
  
  
  
            '''simple docstring'''
  
            self.insert_at_nth(len(self		)							,lowerCamelCase_		)
  
  
  
  
  
  
  
         def    _snake_case			(					self							,lowerCamelCase_							,lowerCamelCase_		):
  
  
  
            '''simple docstring'''
  
            _UpperCAmelCase   	=					len(self		)
  
            if not 0 <= index <= length:
               raise IndexError("list index out of range"		)
            _UpperCAmelCase   	=					Node(lowerCamelCase_		)
            if self.head is None:
               _UpperCAmelCase   	=					_UpperCAmelCase   	=					new_node
            elif index == 0:
               _UpperCAmelCase   	=					new_node
               _UpperCAmelCase   	=					self.head
               _UpperCAmelCase   	=					new_node
            elif index == length:
               _UpperCAmelCase   	=					new_node
               _UpperCAmelCase   	=					self.tail
               _UpperCAmelCase   	=					new_node
            else:
               _UpperCAmelCase   	=					self.head
               for _ in range(0							,lowerCamelCase_		):
                  _UpperCAmelCase   	=					temp.next
               _UpperCAmelCase   	=					new_node
               _UpperCAmelCase   	=					temp.previous
               _UpperCAmelCase   	=					temp
               _UpperCAmelCase   	=					new_node
  
  
  
  
  
  
  
         def    _snake_case			(					self		):
  
  
  
            '''simple docstring'''
  
            return self.delete_at_nth(0		)
  
  
  
  
  
  
  
         def    _snake_case			(					self		):
  
  
  
            '''simple docstring'''
  
            return self.delete_at_nth(len(self		) - 1		)
  
  
  
  
  
  
  
         def    _snake_case			(					self							,lowerCamelCase_		):
  
  
  
            '''simple docstring'''
  
            _UpperCAmelCase   	=					len(self		)
  
            if not 0 <= index <= length - 1:
               raise IndexError("list index out of range"		)
            _UpperCAmelCase   	=					self.head  # default first node
            if length == 1:
               _UpperCAmelCase   	=					_UpperCAmelCase   	=					None
            elif index == 0:
               _UpperCAmelCase   	=					self.head.next
               _UpperCAmelCase   	=					None
            elif index == length - 1:
               _UpperCAmelCase   	=					self.tail
               _UpperCAmelCase   	=					self.tail.previous
               _UpperCAmelCase   	=					None
            else:
               _UpperCAmelCase   	=					self.head
               for _ in range(0							,lowerCamelCase_		):
                  _UpperCAmelCase   	=					temp.next
               _UpperCAmelCase   	=					temp
               _UpperCAmelCase   	=					temp.previous
               _UpperCAmelCase   	=					temp.next
            return delete_node.data
  
  
  
  
  
  
  
         def    _snake_case			(					self							,lowerCamelCase_		):
  
  
  
            '''simple docstring'''
  
            _UpperCAmelCase   	=					self.head
  
            while current.data != data:  # Find the position to delete
               if current.next:
                  _UpperCAmelCase   	=					current.next
               else:  # We have reached the end an no value matches
                  raise ValueError("No data matching given value"		)
  
            if current == self.head:
               self.delete_head()
  
            elif current == self.tail:
               self.delete_tail()
  
            else:  # Before: 1 <--> 2(current) <--> 3
               _UpperCAmelCase   	=					current.next  # 1 --> 3
               _UpperCAmelCase   	=					current.previous  # 1 <--> 3
            return data
  
  
  
  
  
  
  
         def    _snake_case			(					self		):
  
  
  
            '''simple docstring'''
  
            return len(self		) == 0
  
  
  
  def 			__UpperCAmelCase		(		)     ->       None:
     _UpperCAmelCase   	=					DoublyLinkedList()
     assert linked_list.is_empty() is True
     assert str(a_				) == ""
  
     try:
        linked_list.delete_head()
        raise AssertionError  # This should not happen.
     except IndexError:
        assert True  # This should happen.
  
     try:
        linked_list.delete_tail()
        raise AssertionError  # This should not happen.
     except IndexError:
        assert True  # This should happen.
  
     for i in range(10				):
        assert len(a_				) == i
        linked_list.insert_at_nth(a_    ,  i + 1				)
     assert str(a_				) == "->".join(str(a_				) for i in range(1    ,  11				)				)
  
     linked_list.insert_at_head(0				)
     linked_list.insert_at_tail(11				)
     assert str(a_				) == "->".join(str(a_				) for i in range(0    ,  12				)				)
  
     assert linked_list.delete_head() == 0
     assert linked_list.delete_at_nth(9				) == 10
     assert linked_list.delete_tail() == 11
     assert len(a_				) == 9
     assert str(a_				) == "->".join(str(a_				) for i in range(1    ,  10				)				)
  
  
  if __name__ == "__main__":
        from doctest import testmod
  
        testmod()
  
  
style_context: 
  """simple docstring"""
  
  
  
  
  
  
  
  from math import floor, sqrt
  def 			__UpperCAmelCase		(		a_			:		int				)     ->       int:
     _UpperCAmelCase   	=					0.0
     _UpperCAmelCase   	=					1.0
     _UpperCAmelCase   	=					int(sqrt(a_				)				)
     _UpperCAmelCase   	=					root
     _UpperCAmelCase   	=					0
     while integer_part != 2 * root:
        _UpperCAmelCase   	=					denominator * integer_part - numerator
        _UpperCAmelCase   	=					(n - numerator**2) / denominator
        _UpperCAmelCase   	=					int((root + numerator) / denominator				)
        period += 1
     return period
  def 			__UpperCAmelCase		(		a_			:		int = 1_00_00				)     ->       int:
     _UpperCAmelCase   	=					0
     for i in range(2    ,  n + 1				):
        _UpperCAmelCase   	=					sqrt(a_				)
        if sr - floor(a_				) != 0 and continuous_fraction_period(a_				) % 2 == 1:
           count_odd_periods += 1
     return count_odd_periods
  
  
  if __name__ == "__main__":
    print(f'''{solution(int(input().strip()))}''')
  
  