"""simple docstring"""


from __future__ import annotations





def 			lowerCamelCase_ (					__lowerCAmelCase				)							->					list[int]:




						'''simple docstring'''



						lowerCamelCase__					=[0] * max_one

						for i in range(0   ,    __lowerCAmelCase				):
												lowerCamelCase__					=i

						for i in range(2   ,    __lowerCAmelCase				):
												if totients[i] == i:
																		for j in range(__lowerCAmelCase   ,    __lowerCAmelCase   ,    __lowerCAmelCase				):
																								totients[j] -= totients[j] // i

						return totients





def 			lowerCamelCase_ (					__lowerCAmelCase   ,    __lowerCAmelCase				)							->					bool:




						'''simple docstring'''



						return sorted(str(__lowerCAmelCase				)				) == sorted(str(__lowerCAmelCase				)				)





def 			lowerCamelCase_ (					__lowerCAmelCase = 1000_0000				)							->					int:




						'''simple docstring'''



						lowerCamelCase__					=1  # i
						lowerCamelCase__					=0  # φ(i)
						lowerCamelCase__					=get_totients(max_n + 1				)

						for i in range(2   ,    max_n + 1				):
												lowerCamelCase__					=totients[i]

												if i * min_denominator < min_numerator * t and has_same_digits(__lowerCAmelCase   ,    __lowerCAmelCase				):
																		lowerCamelCase__					=i
																		lowerCamelCase__					=t

						return min_numerator


if __name__ == "__main__":
	print(F'''{solution() = }''')






def        __lowerCAmelCase    (SCREAMING_SNAKE_CASE = 1000					)->  int:




      """simple docstring"""

      snake_case_       =      0
      snake_case_       =      (n - 1) // 3
      total += ((terms) * (6 + (terms - 1) * 3)) // 2  # total of an A.P.
      snake_case_       =      (n - 1) // 5
      total += ((terms) * (10 + (terms - 1) * 5)) // 2
      snake_case_       =      (n - 1) // 15
      total -= ((terms) * (30 + (terms - 1) * 15)) // 2
      return total


if __name__ == "__main__":
   print(f'''{solution() = }''')