






'''simple docstring'''



import numpy

# List of input, output pairs
SCREAMING_SNAKE_CASE							=						(
    ((5, 2, 3), 15),
    ((6, 5, 9), 25),
    ((11, 12, 13), 41),
    ((1, 1, 1), 8),
    ((11, 12, 13), 41),
)
SCREAMING_SNAKE_CASE							=						(((515, 22, 13), 555), ((61, 35, 49), 150))
SCREAMING_SNAKE_CASE							=						[2, 4, 1, 5]
SCREAMING_SNAKE_CASE							=						len(train_data)
SCREAMING_SNAKE_CASE							=						0.009


def 				lowercase_					(     __A			:							int       ,   __A			:							Dict="train"      )							->   Any:



 """simple docstring"""




 return calculate_hypothesis_value(__A       ,   __A      ) - output(
     __A       ,   __A      )


def 				lowercase_					(     __A			:							Dict      )							->   List[str]:



 """simple docstring"""




 lowercase       : Dict						=0
 for i in range(len(__A      ) - 1      ):
  hyp_val += data_input_tuple[i] * parameter_vector[i + 1]
 hyp_val += parameter_vector[0]
 return hyp_val


def 				lowercase_					(     __A			:							Tuple       ,   __A			:							List[Any]      )							->   Optional[int]:



 """simple docstring"""




 if data_set == "train":
  return train_data[example_no][1]
 elif data_set == "test":
  return test_data[example_no][1]
 return None


def 				lowercase_					(     __A			:							int       ,   __A			:							int      )							->   List[str]:



 """simple docstring"""




 if data_set == "train":
  return _hypothesis_value(train_data[example_no][0]      )
 elif data_set == "test":
  return _hypothesis_value(test_data[example_no][0]      )
 return None


def 				lowercase_					(     __A			:							Optional[Any]       ,   __A			:							int=m      )							->   Union[str, Any]:



 """simple docstring"""




 lowercase       : Tuple						=0
 for i in range(__A      ):
  if index == -1:
   summation_value += _error(__A      )
  else:
   summation_value += _error(__A      ) * train_data[i][0][index]
 return summation_value


def 				lowercase_					(     __A			:							Dict      )							->   List[str]:



 """simple docstring"""




 lowercase       : Optional[int]						=summation_of_cost_derivative(__A       ,   __A      ) / m
 return cost_derivative_value


def 				lowercase_					(     )							->   List[str]:



 """simple docstring"""




 global parameter_vector
 # Tune these values to set a tolerance value for predicted output
 lowercase       : int						=0.000002
 lowercase       : Optional[Any]						=0
 lowercase       : str						=0
 while True:
  j += 1
  lowercase       : Optional[Any]						=[0, 0, 0, 0]
  for i in range(0       ,   len(__A      )      ):
   lowercase       : Any						=get_cost_derivative(i - 1      )
   lowercase       : Tuple						=(
       parameter_vector[i] - LEARNING_RATE * cost_derivative
   )
  if numpy.allclose(
      __A       ,   __A       ,   atol=__A       ,   rtol=__A       ,   ):
   break
  lowercase       : List[str]						=temp_parameter_vector
 print(('''Number of iterations:''', j)      )


def 				lowercase_					(     )							->   Dict:



 """simple docstring"""




 for i in range(len(__A      )      ):
  print(('''Actual output value:''', output(__A       ,   '''test'''      ))      )
  print(('''Hypothesis output:''', calculate_hypothesis_value(__A       ,   '''test'''      ))      )


if __name__ == "__main__":
      run_gradient_descent()
      print('\nTesting gradient descent for a linear hypothesis function.\n')
      test_gradient_descent()











'''simple docstring'''



def 				lowercase_					(     __A			:							int      )							->   int:



 """simple docstring"""




 if n == 1 or not isinstance(__A       ,   __A      ):
  return 0
 elif n == 2:
  return 1
 else:
  lowercase       : Tuple						=[0, 1]
  for i in range(2       ,   n + 1      ):
   sequence.append(sequence[i - 1] + sequence[i - 2]      )

  return sequence[n]


def 				lowercase_					(     __A			:							int      )							->   int:



 """simple docstring"""




 lowercase       : List[str]						=0
 lowercase       : str						=2

 while digits < n:
  index += 1
  lowercase       : int						=len(str(fibonacci(__A      )      )      )

 return index


def 				lowercase_					(     __A			:							int = 1_0_0_0      )							->   int:



 """simple docstring"""




 return fibonacci_digits_index(__A      )


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



