def       A	(    _lowercase = 50_000_000						):
						SCREAMING_SNAKE_CASE							:    Dict							=							set()
						SCREAMING_SNAKE_CASE							:    Union[str, Any]							=							int((limit - 24) ** (1 / 2)						)

						SCREAMING_SNAKE_CASE							:    int							=							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		,  __lowercase						)						)						)

						for primea in primes:
												SCREAMING_SNAKE_CASE							:    List[str]							=							primea * primea
												for primea in primes:
																		SCREAMING_SNAKE_CASE							:    str							=							primea * primea * primea
																		if square + cube >= limit - 16:
																								break
																		for primea in primes:
																								SCREAMING_SNAKE_CASE							:    List[Any]							=							primea * primea * primea * primea
																								SCREAMING_SNAKE_CASE							:    int							=							square + cube + tetr
																								if total >= limit:
																														break
																								ret.add(__lowercase						)

						return len(__lowercase						)


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












'''simple docstring'''
a__							:							Optional[Any] =256
# Modulus to hash a string
a__							:							Dict =1_000_003
def 				lowercase__   (   __lowercase						:  str				,  __lowercase						:  str     ) ->      bool:



       """simple docstring"""






       __UpperCamelCase       =  len(__lowercase     )
       __UpperCamelCase       =  len(__lowercase     )
       if p_len > t_len:
              return False

       __UpperCamelCase       =  0
       __UpperCamelCase       =  0
       __UpperCamelCase       =  1

       # Calculating the hash of pattern and substring of text
       for i in range(__lowercase     ):
              __UpperCamelCase       =  (ord(pattern[i]     ) + p_hash * alphabet_size) % modulus
              __UpperCamelCase       =  (ord(text[i]     ) + text_hash * alphabet_size) % modulus
              if i == p_len - 1:
                     continue
              __UpperCamelCase       =  (modulus_power * alphabet_size) % modulus

       for i in range(0				,  t_len - p_len + 1     ):
              if text_hash == p_hash and text[i : i + p_len] == pattern:
                     return True
              if i == t_len - p_len:
                     continue
              # Calculate the https://en.wikipedia.org/wiki/Rolling_hash
              __UpperCamelCase       =  (
                  (text_hash - ord(text[i]     ) * modulus_power) * alphabet_size
                  + ord(text[i + p_len]     )
              ) % modulus
       return False
def 				lowercase__   (   ) ->      None:



       """simple docstring"""






       __UpperCamelCase       =  'abc1abc12'
       __UpperCamelCase       =  'alskfjaldsabc1abc1abc12k23adsfabcabc'
       __UpperCamelCase       =  'alskfjaldsk23adsfabcabc'
       assert rabin_karp(__lowercase				,  __lowercase     ) and not rabin_karp(__lowercase				,  __lowercase     )

       # Test 2)
       __UpperCamelCase       =  'ABABX'
       __UpperCamelCase       =  'ABABZABABYABABX'
       assert rabin_karp(__lowercase				,  __lowercase     )

       # Test 3)
       __UpperCamelCase       =  'AAAB'
       __UpperCamelCase       =  'ABAAAAAB'
       assert rabin_karp(__lowercase				,  __lowercase     )

       # Test 4)
       __UpperCamelCase       =  'abcdabcy'
       __UpperCamelCase       =  'abcxabcdabxabcdabcdabcy'
       assert rabin_karp(__lowercase				,  __lowercase     )

       # Test 5)
       __UpperCamelCase       =  'Lü'
       __UpperCamelCase       =  'Lüsai'
       assert rabin_karp(__lowercase				,  __lowercase     )
       __UpperCamelCase       =  'Lue'
       assert not rabin_karp(__lowercase				,  __lowercase     )
       print('Success.'     )


if __name__ == "__main__":
    test_rabin_karp()
