


"""simple docstring"""






from collections import defaultdict
from math import gcd
def       A_   (   _lowerCAmelCase     :					int = 1_50_00_00       ):






     """simple docstring"""

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


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



"""simple docstring"""






def       A_   (   _lowerCAmelCase     :					int = 10_00       ):






     """simple docstring"""

     _a	,      _a    	=				1, 1
     _a    	=				2
     while True:
          _a    	=				0
          _a    	=				fa + fa
          _a	,      _a    	=				fa, f
          index += 1
          for _ in str(_lowerCAmelCase       ):
               i += 1
          if i == n:
               break
     return index


if __name__ == "__main__":
   print(solution(int(str(input()).strip())))