

"""simple docstring"""






from __future__ import annotations
def  UpperCamelCase   (     _lowerCAmelCase       :  list,					_lowerCAmelCase       :  list	)			->     list:
 _UpperCAmelCase      :							Optional[int]       =   [None] * (len(_lowerCAmelCase	) + len(_lowerCAmelCase	))

 _UpperCAmelCase      :							int       =   0  # pointer to current index for left Half
 _UpperCAmelCase      :							List[Any]       =   0  # pointer to current index for the right Half
 _UpperCAmelCase      :							Dict       =   0  # pointer to current index for the sorted array Half

 while pointera < len(_lowerCAmelCase	) and pointera < len(_lowerCAmelCase	):
  if left_half[pointera] < right_half[pointera]:
   _UpperCAmelCase      :							int       =   left_half[pointera]
   pointera += 1
   index += 1
  else:
   _UpperCAmelCase      :							List[Any]       =   right_half[pointera]
   pointera += 1
   index += 1
 while pointera < len(_lowerCAmelCase	):
  _UpperCAmelCase      :							Optional[Any]       =   left_half[pointera]
  pointera += 1
  index += 1

 while pointera < len(_lowerCAmelCase	):
  _UpperCAmelCase      :							Optional[Any]       =   right_half[pointera]
  pointera += 1
  index += 1

 return sorted_array
def  UpperCamelCase   (     _lowerCAmelCase       :  list	)			->     list:




 if len(_lowerCAmelCase	) <= 1:
  return array
 # the actual formula to calculate the middle element = left + (right - left) // 2
 # this avoids integer overflow in case of large N
 _UpperCAmelCase      :							Optional[Any]       =   0 + (len(_lowerCAmelCase	) - 0) // 2

 # Split the array into halves till the array length becomes equal to One
 # merge the arrays of single length returned by mergeSort function and
 # pass them into the merge arrays function which merges the array
 _UpperCAmelCase      :							Dict       =   array[:middle]
 _UpperCAmelCase      :							Any       =   array[middle:]

 return merge(merge_sort(_lowerCAmelCase	),					merge_sort(_lowerCAmelCase	)	)


if __name__ == "__main__":
      import doctest

      doctest.testmod()








"""simple docstring"""






import math
def  UpperCamelCase   (     _lowerCAmelCase       :  int	)			->     bool:

	if 1 < number < 4:
		# 2 and 3 are primes
		return True
	elif number < 2 or number % 2 == 0 or number % 3 == 0:
		# Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
		return False

	# All primes number are in format of 6k +/- 1
	for i in range(5,					int(math.sqrt(_lowerCAmelCase	) + 1	),					6	):
		if number % i == 0 or number % (i + 2) == 0:
			return False
	return True
def  UpperCamelCase   (     _lowerCAmelCase       :  int = 2000000	)			->     int:
	return sum(num for num in range(3,					_lowerCAmelCase,					2	) if is_prime(_lowerCAmelCase	)	) + 2 if n > 2 else 0


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





