"""simple docstring"""







def 						__UpperCAmelCase       (					UpperCAmelCase_					:       str						)							->    list:

	'''simple docstring'''





	__snake_case    :							Optional[int]   	=				[0] * len(UpperCAmelCase_						)

	for i in range(1    ,							len(UpperCAmelCase_						)						):
		# use last results for better performance - dynamic programming
		__snake_case    :							Optional[Any]   	=				prefix_result[i - 1]
		while j > 0 and input_string[i] != input_string[j]:
			__snake_case    :							Tuple   	=				prefix_result[j - 1]

		if input_string[i] == input_string[j]:
			j += 1
		__snake_case    :							str   	=				j

	return prefix_result
def 						__UpperCAmelCase       (					UpperCAmelCase_					:       str						)							->    int:

	'''simple docstring'''





	return max(prefix_function(UpperCAmelCase_						)						)


if __name__ == "__main__":
	import doctest

	doctest.testmod()






"""simple docstring"""







from __future__ import annotations
def 						__UpperCAmelCase       (					UpperCAmelCase_					:       int						)							->    list[int]:

	'''simple docstring'''





	__snake_case    :							Union[str, Any]   	=				[True] * limit
	__snake_case    :							Tuple   	=				False
	__snake_case    :							Union[str, Any]   	=				False
	__snake_case    :							List[str]   	=				True

	for i in range(3    ,							int(limit**0.5 + 1						)    ,							2						):
		__snake_case    :							List[str]   	=				i * 2
		while index < limit:
			__snake_case    :							List[str]   	=				False
			__snake_case    :							Union[str, Any]   	=				index + i

	__snake_case    :							str   	=				[2]

	for i in range(3    ,							UpperCAmelCase_    ,							2						):
		if is_prime[i]:
			primes.append(UpperCAmelCase_						)

	return primes
def 						__UpperCAmelCase       (					UpperCAmelCase_					:       int = 1_00_00_00						)							->    int:

	'''simple docstring'''





	__snake_case    :							Tuple   	=				prime_sieve(UpperCAmelCase_						)
	__snake_case    :							int   	=				0
	__snake_case    :							str   	=				0

	for i in range(len(UpperCAmelCase_						)						):
		for j in range(i + length    ,							len(UpperCAmelCase_						)						):
			__snake_case    :							Union[str, Any]   	=				sum(primes[i:j]						)
			if sol >= ceiling:
				break

			if sol in primes:
				__snake_case    :							List[Any]   	=				j - i
				__snake_case    :							Optional[Any]   	=				sol

	return largest


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





