


'''simple docstring'''





def 					a__    (				UpperCamelCase_	:			int = 10**6	):

   if n <= 0:
      raise ValueError('''Please enter an integer greater than 0'''	)

   UpperCAmelCase__  :Union[str, Any]            =			list(range(n + 1	)	)
   for number in range(2,      n + 1	):
      if phi[number] == number:
         phi[number] -= 1
         for multiple in range(number * 2,      n + 1,      UpperCamelCase_	):
            UpperCAmelCase__  :Dict            =			(phi[multiple] // number) * (number - 1)

   UpperCAmelCase__  :Dict            =			1
   for number in range(1,      n + 1	):
      if (answer / phi[answer]) < (number / phi[number]):
         UpperCAmelCase__  :Union[str, Any]            =			number

   return answer


if __name__ == "__main__":
    print(solution())





'''simple docstring'''





from scipy.constants import g


def 					a__    (				UpperCamelCase_	:			float,      UpperCamelCase_	:			float	):
   if mass < 0:
      # handling of negative values of mass
      raise ValueError('''The mass of a body cannot be negative'''	)
   if height < 0:
      # handling of negative values of height
      raise ValueError('''The height above the ground cannot be negative'''	)
   return mass * g * height


if __name__ == "__main__":
    from doctest import testmod

    testmod(name='''potential_energy''')



