





from math import sqrt

import numpy as np
from sympy import symbols

# Coefficient
# Speed of light (m/s)
_UpperCAmelCase             =							2_9979_2458

# Symbols
_UpperCAmelCase       ,     _UpperCAmelCase       ,     _UpperCAmelCase       ,     _UpperCAmelCase             =							symbols('ct x y z')






def 	_SCREAMING_SNAKE_CASE		(      SCREAMING_SNAKE_CASE		:float   )      ->   float:
 if velocity > c:
  raise ValueError("""Speed must not exceed light speed 299,792,458 [m/s]!"""   )
 elif velocity < 1:
  # Usually the speed should be much higher than 1 (c order of magnitude)
  raise ValueError("""Speed must be greater than or equal to 1!"""   )

 return velocity / c






def 	_SCREAMING_SNAKE_CASE		(      SCREAMING_SNAKE_CASE		:float   )      ->   float:
 return 1 / sqrt(1 - beta(SCREAMING_SNAKE_CASE   ) ** 2   )






def 	_SCREAMING_SNAKE_CASE		(      SCREAMING_SNAKE_CASE		:float   )      ->   np.ndarray:
 return np.array(
     [
         [gamma(SCREAMING_SNAKE_CASE   ), -gamma(SCREAMING_SNAKE_CASE   ) * beta(SCREAMING_SNAKE_CASE   ), 0, 0],
         [-gamma(SCREAMING_SNAKE_CASE   ) * beta(SCREAMING_SNAKE_CASE   ), gamma(SCREAMING_SNAKE_CASE   ), 0, 0],
         [0, 0, 1, 0],
         [0, 0, 0, 1],
     ]   )






def 	_SCREAMING_SNAKE_CASE		(      SCREAMING_SNAKE_CASE		:float   ,   SCREAMING_SNAKE_CASE		:np.ndarray | None = None   )      ->   np.ndarray:
 # Ensure event is not empty
 if event is None:
  __lowerCAmelCase					:	Optional[Any]      =       np.array([ct, x, y, z]   )  # Symbolic four vector
 else:
  event[0] *= c  # x0 is ct (speed of light * time)

 return transformation_matrix(SCREAMING_SNAKE_CASE   ) @ event


if __name__ == "__main__":
      import doctest

      doctest.testmod()

      # Example of symbolic vector:
      _UpperCAmelCase             =							transform(2997_9245)
      print('Example of four vector: ')
      print(f'''ct\' = {four_vector[0]}''')
      print(f'''x\' = {four_vector[1]}''')
      print(f'''y\' = {four_vector[2]}''')
      print(f'''z\' = {four_vector[3]}''')

      # Substitute symbols with numerical values
      _UpperCAmelCase             =							{ct: c, x: 1, y: 1, z: 1}
      _UpperCAmelCase             =							[four_vector[i].subs(sub_dict) for i in range(4)]

      print(f'''\n{numerical_vector}''')






from math import isqrt






def 	_SCREAMING_SNAKE_CASE		(      SCREAMING_SNAKE_CASE		:int   )      ->   list[int]:
 __lowerCAmelCase					:	Tuple      =       [True] * max_number
 for i in range(2   ,   isqrt(max_number - 1   ) + 1   ):
  if is_prime[i]:
   for j in range(i**2   ,   SCREAMING_SNAKE_CASE   ,   SCREAMING_SNAKE_CASE   ):
    __lowerCAmelCase					:	Tuple      =       False

 return [i for i in range(2   ,   SCREAMING_SNAKE_CASE   ) if is_prime[i]]






def 	_SCREAMING_SNAKE_CASE		(      SCREAMING_SNAKE_CASE		:int = 10**8   )      ->   int:
 __lowerCAmelCase					:	int      =       calculate_prime_numbers(max_number // 2   )

 __lowerCAmelCase					:	List[Any]      =       0
 __lowerCAmelCase					:	List[str]      =       0
 __lowerCAmelCase					:	List[Any]      =       len(SCREAMING_SNAKE_CASE   ) - 1
 while left <= right:
  while prime_numbers[left] * prime_numbers[right] >= max_number:
   right -= 1
  semiprimes_count += right - left + 1
  left += 1

 return semiprimes_count


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