





def    __lowercase   (      _SCREAMING_SNAKE_CASE = 1_00_00_00	) ->   int:


      '''simple docstring'''


      SCREAMING_SNAKE_CASE		=						set(range(3 ,						_SCREAMING_SNAKE_CASE ,						2	)	)
      primes.add(2	)
      for p in range(3 ,						_SCREAMING_SNAKE_CASE ,						2	):
            if p not in primes:
                  continue
            primes.difference_update(set(range(p * p ,						_SCREAMING_SNAKE_CASE ,						_SCREAMING_SNAKE_CASE	)	)	)

      SCREAMING_SNAKE_CASE		=						[float(_SCREAMING_SNAKE_CASE	) for n in range(limit + 1	)]

      for p in primes:
            for n in range(_SCREAMING_SNAKE_CASE ,						limit + 1 ,						_SCREAMING_SNAKE_CASE	):
                  phi[n] *= 1 - 1 / p

      return int(sum(phi[2:]	)	)


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









from collections import defaultdict
from math import gcd



def    __lowercase   (      _SCREAMING_SNAKE_CASE = 1_50_00_00	) ->   int:


      '''simple docstring'''


      SCREAMING_SNAKE_CASE		=						defaultdict(_SCREAMING_SNAKE_CASE	)
      SCREAMING_SNAKE_CASE		=						2
      while 2 * euclid_m * (euclid_m + 1) <= limit:
            for euclid_n in range((euclid_m % 2) + 1 ,						_SCREAMING_SNAKE_CASE ,						2	):
                  if gcd(_SCREAMING_SNAKE_CASE ,						_SCREAMING_SNAKE_CASE	) > 1:
                        continue
                  SCREAMING_SNAKE_CASE		=						2 * euclid_m * (euclid_m + euclid_n)
                  for perimeter in range(_SCREAMING_SNAKE_CASE ,						limit + 1 ,						_SCREAMING_SNAKE_CASE	):
                        frequencies[perimeter] += 1
            euclid_m += 1
      return sum(1 for frequency in frequencies.values() if frequency == 1	)


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


