

def    __lowerCamelCase      (					UpperCamelCase__ = 1000000 ):







							'''simple docstring'''






							snake_case_     							=       limit + 1
							snake_case_     							=       [0] * limit
							for first_term in range(1  ,				UpperCamelCase__ ):
														for n in range(UpperCamelCase__  ,				UpperCamelCase__  ,				UpperCamelCase__ ):
																					snake_case_     							=       first_term + n / first_term
																					if common_difference % 4:  # d must be divisble by 4
																												continue
																					else:
																												common_difference /= 4
																												if (
																												    first_term > common_difference
																												    and first_term < 4 * common_difference
																												):  # since x,y,z are positive integers
																																			frequency[n] += 1  # so z>0 and a>d ,also 4d<a

							snake_case_     							=       sum(1 for x in frequency[1:limit] if x == 10 )

							return count


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







def    __lowerCamelCase      (					UpperCamelCase__ = 1000 ):







							'''simple docstring'''






							snake_case_     							=       2**power
							snake_case_     							=       0
							while n:
														snake_case_							,       snake_case_     							=       r + n % 10, n // 10
							return r


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




