from __future__ import annotations

from collections.abc import Iterator







class 				lowercase       :




				def __init__(      self   ,     snake_case ):
											snake_case_           =					value
											snake_case_           =					None
											snake_case_           =					None







class 				lowercase       :




				def __init__(      self   ,     snake_case ):
											snake_case_           =					tree




				def 					a							(      self   ,     snake_case ):
											if node is None:
																		return 0
											return node.value + (
											    self.depth_first_search(node.left ) + self.depth_first_search(node.right )
											)




				def __iter__(      self ):
											yield self.depth_first_search(self.tree )


if __name__ == "__main__":
					import doctest

					doctest.testmod()







def       __lowerCamelCase			(				UpperCamelCase__ = 50000000   ):







							'''simple docstring'''






							snake_case_           =					set()
							snake_case_           =					int((limit - 24) ** (1 / 2)   )

							snake_case_           =					set(range(3     ,							prime_square_limit + 1     ,							2   )   )
							primes.add(2   )
							for p in range(3     ,							prime_square_limit + 1     ,							2   ):
														if p not in primes:
																					continue
														primes.difference_update(set(range(p * p     ,							prime_square_limit + 1     ,							UpperCamelCase__   )   )   )

							for primea in primes:
														snake_case_           =					primea * primea
														for primea in primes:
																					snake_case_           =					primea * primea * primea
																					if square + cube >= limit - 16:
																												break
																					for primea in primes:
																												snake_case_           =					primea * primea * primea * primea
																												snake_case_           =					square + cube + tetr
																												if total >= limit:
																																			break
																												ret.add(UpperCamelCase__   )

							return len(UpperCamelCase__   )


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




