



'''simple docstring'''






def        snake_case_   (	lowerCAmelCase_ = 10**6						)->						int:





       '''simple docstring'''


       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			,  lowerCAmelCase_						):
                            _UpperCAmelCase    :		Any     	=					(phi[multiple] // number) * (number - 1)

       _UpperCAmelCase    :		int     	=					1
       for number in range(1			,  n + 1						):
              if (answer / phi[answer]) < (number / phi[number]):
                     _UpperCAmelCase    :		str     	=					number

       return answer


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








'''simple docstring'''






def        snake_case_   (	lowerCAmelCase_			,  lowerCAmelCase_						)->						Union[str, Any]:





       '''simple docstring'''


       if n < 0:
              return 0
       # table[i] represents the number of ways to get to amount i
       _UpperCAmelCase    :		Union[str, Any]     	=					[0] * (n + 1)

       # There is exactly 1 way to get to zero(You pick no coins).
       _UpperCAmelCase    :		Optional[int]     	=					1

       # Pick all coins one by one and update table[] values
       # after the index greater than or equal to the value of the
       # picked coin
       for coin_val in s:
              for j in range(lowerCAmelCase_			,  n + 1						):
                     table[j] += table[j - coin_val]

       return table[n]


if __name__ == "__main__":
   import doctest

   doctest.testmod()



