
"""simple docstring"""







from math import gcd
def       __UpperCAmelCase		(		a_      :		int = 1_20_00					)  ->							int:
   _UpperCAmelCase 						=       0
   for d in range(max_d + 1					):
      for n in range(d // 3 + 1     ,	(d + 1) // 2					):
         if gcd(a_     ,	a_					) == 1:
            fractions_number += 1
   return fractions_number


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



"""simple docstring"""







def       __UpperCAmelCase		(		a_      :		list[int]					)  ->							int:

   # validate:
   if not isinstance(a_     ,	a_					) or not all(
       isinstance(a_     ,	a_					) and item >= 0 for item in citations					):
      raise ValueError("The citations should be a list of non negative integers."					)

   citations.sort()
   _UpperCAmelCase 						=       len(a_					)

   for i in range(a_					):
      if citations[len_citations - 1 - i] <= i:
         return i

   return len_citations


if __name__ == "__main__":
  import doctest

  doctest.testmod()

