



import numpy as np

class        _A			:



       def __init__(						self				:	Any	,						__SCREAMING_SNAKE_CASE				:	Dict=5	,						__SCREAMING_SNAKE_CASE				:	Dict=5):


           '''simple docstring'''

           __a					=							depth
           __a					=							0
           __a					=							None
           __a					=							None
           __a					=							min_leaf_size
           __a					=							None



       def 						_lowerCamelCase     (						self				:	Optional[Any]	,						__SCREAMING_SNAKE_CASE				:	Tuple	,						__SCREAMING_SNAKE_CASE				:	Dict):


           '''simple docstring'''

           if labels.ndim != 1:
               print('''Error: Input labels must be one dimensional''')

           return np.mean((labels - prediction) ** 2)



       def 						_lowerCamelCase     (						self				:	List[str]	,						__SCREAMING_SNAKE_CASE				:	Optional[int]	,						__SCREAMING_SNAKE_CASE				:	Optional[Any]):


           '''simple docstring'''

           if x.ndim != 1:
               print('''Error: Input data set must be one dimensional''')
               return
           if len(__SCREAMING_SNAKE_CASE) != len(__SCREAMING_SNAKE_CASE):
               print('''Error: X and y have different lengths''')
               return
           if y.ndim != 1:
               print('''Error: Data set labels must be one dimensional''')
               return

           if len(__SCREAMING_SNAKE_CASE) < 2 * self.min_leaf_size:
               __a					=							np.mean(__SCREAMING_SNAKE_CASE)
               return

           if self.depth == 1:
               __a					=							np.mean(__SCREAMING_SNAKE_CASE)
               return

           __a					=							0
           __a					=							self.mean_squared_error(__SCREAMING_SNAKE_CASE	,						np.mean(__SCREAMING_SNAKE_CASE)) * 2
           for i in range(len(__SCREAMING_SNAKE_CASE)):
               if len(x[:i]) < self.min_leaf_size:
                   continue
               elif len(x[i:]) < self.min_leaf_size:
                   continue
               else:
                   __a					=							self.mean_squared_error(x[:i]	,						np.mean(y[:i]))
                   __a					=							self.mean_squared_error(x[i:]	,						np.mean(y[i:]))
                   __a					=							error_left + error_right
                   if error < min_error:
                       __a					=							i
                       __a					=							error

           if best_split != 0:
               __a					=							x[:best_split]
               __a					=							y[:best_split]
               __a					=							x[best_split:]
               __a					=							y[best_split:]

               __a					=							x[best_split]
               __a					=							DecisionTree(
                   depth=self.depth - 1	,						min_leaf_size=self.min_leaf_size)
               __a					=							DecisionTree(
                   depth=self.depth - 1	,						min_leaf_size=self.min_leaf_size)
               self.left.train(__SCREAMING_SNAKE_CASE	,						__SCREAMING_SNAKE_CASE)
               self.right.train(__SCREAMING_SNAKE_CASE	,						__SCREAMING_SNAKE_CASE)
           else:
               __a					=							np.mean(__SCREAMING_SNAKE_CASE)

           return





       def 						_lowerCamelCase     (						self				:	Dict	,						__SCREAMING_SNAKE_CASE				:	str):


           '''simple docstring'''

           if self.prediction is not None:
               return self.prediction
           elif self.left or self.right is not None:
               if x >= self.decision_boundary:
                   return self.right.predict(__SCREAMING_SNAKE_CASE)
               else:
                   return self.left.predict(__SCREAMING_SNAKE_CASE)
           else:
               print('''Error: Decision tree not yet trained''')
               return None


class        _A			:



       @staticmethod
       def 						_lowerCamelCase     (						__SCREAMING_SNAKE_CASE				:	List[str]	,						__SCREAMING_SNAKE_CASE				:	Tuple):


           '''simple docstring'''

           __a					=							float(0)
           for label in labels:
               squared_error_sum += (label - prediction) ** 2

           return float(squared_error_sum / labels.size)





def 	__snake_case      (     ):
    __a					=							np.arange(-1.0  ,					1.0  ,					0.0_05							)
    __a					=							np.sin(_UpperCAmelCase							)

    __a					=							DecisionTree(depth=10  ,					min_leaf_size=10							)
    tree.train(_UpperCAmelCase  ,					_UpperCAmelCase							)

    __a					=							(np.random.rand(10							) * 2) - 1
    __a					=							np.array([tree.predict(_UpperCAmelCase							) for x in test_cases]							)
    __a					=							np.mean((predictions - test_cases) ** 2							)

    print('''Test values: ''' + str(_UpperCAmelCase							)							)
    print('''Predictions: ''' + str(_UpperCAmelCase							)							)
    print('''Average error: ''' + str(_UpperCAmelCase							)							)


if __name__ == "__main__":
 main()
 import doctest

 doctest.testmod(name='''mean_squarred_error''', verbose=True)










from math import floor, sqrt





def 	__snake_case      (     _UpperCAmelCase							):
    __a					=							0.0
    __a					=							1.0
    __a					=							int(sqrt(_UpperCAmelCase							)							)
    __a					=							root
    __a					=							0
    while integer_part != 2 * root:
        __a					=							denominator * integer_part - numerator
        __a					=							(n - numerator**2) / denominator
        __a					=							int((root + numerator) / denominator							)
        period += 1
    return period





def 	__snake_case      (     _UpperCAmelCase = 10000							):
    __a					=							0
    for i in range(2  ,					n + 1							):
        __a					=							sqrt(_UpperCAmelCase							)
        if sr - floor(_UpperCAmelCase							) != 0 and continuous_fraction_period(_UpperCAmelCase							) % 2 == 1:
            count_odd_periods += 1
    return count_odd_periods


if __name__ == "__main__":
 print(f'{solution(int(input().strip()))}')





