
from math import sqrt

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						int       ) ->       bool:

				"""simple docstring"""







				assert isinstance(__UpperCamelCase							,						__UpperCamelCase       ) and (
				    number >= 0
				), "'number' must been an int and positive"

				A__  :	str         =							True

				# 0 and 1 are none primes.
				if number <= 1:
								A__  :	Tuple         =							False

				for divisor in range(2							,						int(round(sqrt(__UpperCamelCase       )       )       ) + 1       ):
								# if 'number' divisible by 'divisor' then sets 'status'
								# of false and break up the loop.
								if number % divisor == 0:
												A__  :	Optional[Any]         =							False
												break

    # precondition
				assert isinstance(__UpperCamelCase							,						__UpperCamelCase       ), "'status' must been from type bool"

				return status

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						List[Any]       ) ->       List[Any]:

				"""simple docstring"""







				assert isinstance(__UpperCamelCase							,						__UpperCamelCase       ) and (n > 2), "'N' must been an int and > 2"

				# beginList: contains all natural numbers from 2 up to N
				A__  :	Any         =							list(range(2							,						n + 1       )       )

				A__  :	int         =							[]  # this list will be returns.

				# actual sieve of erathostenes
				for i in range(len(__UpperCamelCase       )       ):
								for j in range(i + 1							,						len(__UpperCamelCase       )       ):
												if (begin_list[i] != 0) and (begin_list[j] % begin_list[i] == 0):
																A__  :	int         =							0

    # filters actual prime numbers.
				A__  :	Optional[int]         =							[x for x in begin_list if x != 0]

				# precondition
				assert isinstance(__UpperCamelCase							,						__UpperCamelCase       ), "'ans' must been from type list"

				return ans

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						Any       ) ->       Union[str, Any]:

				"""simple docstring"""







				assert isinstance(__UpperCamelCase							,						__UpperCamelCase       ) and (n > 2), "'N' must been an int and > 2"

				A__  :	Tuple         =							[]

				# iterates over all numbers between 2 up to N+1
				# if a number is prime then appends to list 'ans'
				for number in range(2							,						n + 1       ):
								if is_prime(__UpperCamelCase       ):
												ans.append(__UpperCamelCase       )

    # precondition
				assert isinstance(__UpperCamelCase							,						__UpperCamelCase       ), "'ans' must been from type list"

				return ans

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						Dict       ) ->       Any:

				"""simple docstring"""







				assert isinstance(__UpperCamelCase							,						__UpperCamelCase       ) and number >= 0, "'number' must been an int and >= 0"

				A__  :	int         =							[]  # this list will be returns of the function.

				# potential prime number factors.

				A__  :	Tuple         =							2

				A__  :	Optional[int]         =							number

				if number == 0 or number == 1:
								ans.append(__UpperCamelCase       )

				# if 'number' not prime then builds the prime factorization of 'number'
				elif not is_prime(__UpperCamelCase       ):
								while quotient != 1:
												if is_prime(__UpperCamelCase       ) and (quotient % factor == 0):
																ans.append(__UpperCamelCase       )
																quotient /= factor
												else:
																factor += 1

				else:
								ans.append(__UpperCamelCase       )

				# precondition
				assert isinstance(__UpperCamelCase							,						__UpperCamelCase       ), "'ans' must been from type list"

				return ans

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						int       ) ->       Dict:

				"""simple docstring"""







				assert isinstance(__UpperCamelCase							,						__UpperCamelCase       ) and (
				    number >= 0
				), "'number' bust been an int and >= 0"

				A__  :	Any         =							0

				# prime factorization of 'number'
				A__  :	Optional[int]         =							prime_factorization(__UpperCamelCase       )

				A__  :	str         =							max(__UpperCamelCase       )

				# precondition
				assert isinstance(__UpperCamelCase							,						__UpperCamelCase       ), "'ans' must been from type int"

				return ans

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						Any       ) ->       Any:

				"""simple docstring"""







				assert isinstance(__UpperCamelCase							,						__UpperCamelCase       ) and (
				    number >= 0
				), "'number' bust been an int and >= 0"

				A__  :	Union[str, Any]         =							0

				# prime factorization of 'number'
				A__  :	Optional[Any]         =							prime_factorization(__UpperCamelCase       )

				A__  :	Optional[int]         =							min(__UpperCamelCase       )

				# precondition
				assert isinstance(__UpperCamelCase							,						__UpperCamelCase       ), "'ans' must been from type int"

				return ans

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						Union[str, Any]       ) ->       Union[str, Any]:

				"""simple docstring"""







				assert isinstance(__UpperCamelCase							,						__UpperCamelCase       ), "'number' must been an int"
				assert isinstance(number % 2 == 0							,						__UpperCamelCase       ), "compare bust been from type bool"

				return number % 2 == 0

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						List[Any]       ) ->       Union[str, Any]:

				"""simple docstring"""







				assert isinstance(__UpperCamelCase							,						__UpperCamelCase       ), "'number' must been an int"
				assert isinstance(number % 2 != 0							,						__UpperCamelCase       ), "compare bust been from type bool"

				return number % 2 != 0

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						Any       ) ->       int:

				"""simple docstring"""







				assert (
				    isinstance(__UpperCamelCase							,						__UpperCamelCase       ) and (number > 2) and is_even(__UpperCamelCase       )
				), "'number' must been an int, even and > 2"

				A__  :	Dict         =							[]  # this list will returned

				# creates a list of prime numbers between 2 up to 'number'
				A__  :	List[str]         =							get_prime_numbers(__UpperCamelCase       )
				A__  :	int         =							len(__UpperCamelCase       )

				# run variable for while-loops.
				A__  :	List[str]         =							0
				A__  :	List[str]         =							None

				# exit variable. for break up the loops
				A__  :	Any         =							True

				while i < len_pn and loop:
								A__  :	str         =							i + 1

								while j < len_pn and loop:
												if prime_numbers[i] + prime_numbers[j] == number:
																A__  :	str         =							False
																ans.append(prime_numbers[i]       )
																ans.append(prime_numbers[j]       )

												j += 1

								i += 1

				# precondition
				assert (
				    isinstance(__UpperCamelCase							,						__UpperCamelCase       )
				    and (len(__UpperCamelCase       ) == 2)
				    and (ans[0] + ans[1] == number)
				    and is_prime(ans[0]       )
				    and is_prime(ans[1]       )
				), "'ans' must contains two primes. And sum of elements must been eq 'number'"

				return ans

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						Tuple							,						__UpperCamelCase :						int       ) ->       List[Any]:

				"""simple docstring"""







				assert (
				    isinstance(__UpperCamelCase							,						__UpperCamelCase       )
				    and isinstance(__UpperCamelCase							,						__UpperCamelCase       )
				    and (numbera >= 0)
				    and (numbera >= 0)
				), "'number1' and 'number2' must been positive integer."

				A__  :	int         =							0

				while numbera != 0:
								A__  :	Dict         =							numbera % numbera
								A__  :	List[str]         =							numbera
								A__  :	int         =							rest

				# precondition
				assert isinstance(__UpperCamelCase							,						__UpperCamelCase       ) and (
				    numbera >= 0
				), "'number' must been from type int and positive"

				return numbera

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						Optional[int]							,						__UpperCamelCase :						Any       ) ->       Dict:

				"""simple docstring"""







				assert (
				    isinstance(__UpperCamelCase							,						__UpperCamelCase       )
				    and isinstance(__UpperCamelCase							,						__UpperCamelCase       )
				    and (numbera >= 1)
				    and (numbera >= 1)
				), "'number1' and 'number2' must been positive integer."

				A__  :	Any         =							1  # actual answer that will be return.

				# for kgV (x,1)
				if numbera > 1 and numbera > 1:
								# builds the prime factorization of 'number1' and 'number2'
								A__  :	List[str]         =							prime_factorization(__UpperCamelCase       )
								A__  :	Dict         =							prime_factorization(__UpperCamelCase       )

				elif numbera == 1 or numbera == 1:
								A__  :	Any         =							[]
								A__  :	Dict         =							[]
								A__  :	Optional[int]         =							max(__UpperCamelCase							,						__UpperCamelCase       )

				A__  :	str         =							0
				A__  :	List[Any]         =							0

				A__  :	List[str]         =							[]  # captured numbers int both 'primeFac1' and 'primeFac2'

				# iterates through primeFac1
				for n in prime_fac_a:
								if n not in done:
												if n in prime_fac_a:
																A__  :	Union[str, Any]         =							prime_fac_a.count(__UpperCamelCase       )
																A__  :	List[str]         =							prime_fac_a.count(__UpperCamelCase       )

																for _ in range(max(__UpperCamelCase							,						__UpperCamelCase       )       ):
																				ans *= n

												else:
																A__  :	Any         =							prime_fac_a.count(__UpperCamelCase       )

																for _ in range(__UpperCamelCase       ):
																				ans *= n

												done.append(__UpperCamelCase       )

    # iterates through primeFac2
				for n in prime_fac_a:
								if n not in done:
												A__  :	List[Any]         =							prime_fac_a.count(__UpperCamelCase       )

												for _ in range(__UpperCamelCase       ):
																ans *= n

												done.append(__UpperCamelCase       )

    # precondition
				assert isinstance(__UpperCamelCase							,						__UpperCamelCase       ) and (
				    ans >= 0
				), "'ans' must been from type int and positive"

				return ans

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						List[Any]       ) ->       str:

				"""simple docstring"""







				assert isinstance(__UpperCamelCase							,						__UpperCamelCase       ) and (n >= 0), "'number' must been a positive int"

				A__  :	Tuple         =							0
				A__  :	int         =							2  # this variable holds the answer

				while index < n:
								index += 1

								ans += 1  # counts to the next number

								# if ans not prime then
								# runs to the next prime number.
								while not is_prime(__UpperCamelCase       ):
												ans += 1

    # precondition
				assert isinstance(__UpperCamelCase							,						__UpperCamelCase       ) and is_prime(
				    __UpperCamelCase       ), "'ans' must been a prime number and from type int"

				return ans

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						List[str]							,						__UpperCamelCase :						Optional[Any]       ) ->       Union[str, Any]:

				"""simple docstring"""







				assert (
				    is_prime(__UpperCamelCase       ) and is_prime(__UpperCamelCase       ) and (p_number_a < p_number_a)
				), "The arguments must been prime numbers and 'pNumber1' < 'pNumber2'"

				A__  :	List[Any]         =							p_number_a + 1  # jump to the next number

				A__  :	Any         =							[]  # this list will be returns.

				# if number is not prime then
				# fetch the next prime number.
				while not is_prime(__UpperCamelCase       ):
								number += 1

				while number < p_number_a:
								ans.append(__UpperCamelCase       )

								number += 1

								# fetch the next prime number.
								while not is_prime(__UpperCamelCase       ):
												number += 1

    # precondition
				assert (
				    isinstance(__UpperCamelCase							,						__UpperCamelCase       )
				    and ans[0] != p_number_a
				    and ans[len(__UpperCamelCase       ) - 1] != p_number_a
				), "'ans' must been a list without the arguments"

				# 'ans' contains not 'pNumber1' and 'pNumber2' !
				return ans

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						Optional[Any]       ) ->       Optional[int]:

				"""simple docstring"""







				assert isinstance(__UpperCamelCase							,						__UpperCamelCase       ) and (n >= 1), "'n' must been int and >= 1"

				A__  :	str         =							[]  # will be returned.

				for divisor in range(1							,						n + 1       ):
								if n % divisor == 0:
												ans.append(__UpperCamelCase       )

    # precondition
				assert ans[0] == 1 and ans[len(__UpperCamelCase       ) - 1] == n, "Error in function getDivisiors(...)"

				return ans

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						List[Any]       ) ->       Union[str, Any]:

				"""simple docstring"""







				assert isinstance(__UpperCamelCase							,						__UpperCamelCase       ) and (
				    number > 1
				), "'number' must been an int and >= 1"

				A__  :	List[str]         =							get_divisors(__UpperCamelCase       )

				# precondition
				assert (
				    isinstance(__UpperCamelCase							,						__UpperCamelCase       )
				    and (divisors[0] == 1)
				    and (divisors[len(__UpperCamelCase       ) - 1] == number)
				), "Error in help-function getDivisiors(...)"

				# summed all divisors up to 'number' (exclusive), hence [:-1]
				return sum(divisors[:-1]       ) == number

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						Tuple							,						__UpperCamelCase :						Optional[int]       ) ->       List[str]:

				"""simple docstring"""







				assert (
				    isinstance(__UpperCamelCase							,						__UpperCamelCase       )
				    and isinstance(__UpperCamelCase							,						__UpperCamelCase       )
				    and (denominator != 0)
				), "The arguments must been from type int and 'denominator' != 0"

				# build the greatest common divisor of numerator and denominator.
				A__  :	Union[str, Any]         =							gcd(abs(__UpperCamelCase       )							,						abs(__UpperCamelCase       )       )

				# precondition
				assert (
				    isinstance(__UpperCamelCase							,						__UpperCamelCase       )
				    and (numerator % gcd_of_fraction == 0)
				    and (denominator % gcd_of_fraction == 0)
				), "Error in function gcd(...,...)"

				return (numerator // gcd_of_fraction, denominator // gcd_of_fraction)

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						str       ) ->       Optional[Any]:

				"""simple docstring"""







				assert isinstance(__UpperCamelCase							,						__UpperCamelCase       ) and (n >= 0), "'n' must been a int and >= 0"

				A__  :	Tuple         =							1  # this will be return.

				for factor in range(1							,						n + 1       ):
								ans *= factor

				return ans



def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						Tuple       ) ->       List[Any]:

				"""simple docstring"""







				assert isinstance(__UpperCamelCase							,						__UpperCamelCase       ) and (n >= 0), "'n' must been an int and >= 0"

				A__  :	List[Any]         =							0
				A__  :	Optional[int]         =							1
				A__  :	List[Any]         =							1  # this will be return

				for _ in range(n - 1       ):
								A__  :	str         =							ans
								ans += fiba
								A__  :	List[Any]         =							tmp

				return ans

_SCREAMING_SNAKE_CASE    :      List[str]          =			range(2, 2_0 + 1)
_SCREAMING_SNAKE_CASE    :      Optional[Any]          =			[1_0**k for k in range(ks[-1] + 1)]
_SCREAMING_SNAKE_CASE    :      dict[int, dict[int, list[list[int]]]]          =			{}

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						Any							,						__UpperCamelCase :						Dict							,						__UpperCamelCase :						Any							,						__UpperCamelCase :						Optional[Any]       ) ->       int:

				"""simple docstring"""







				A__  :	Tuple         =							sum(a_i[j] for j in range(__UpperCamelCase							,						len(__UpperCamelCase       )       )       )
				A__  :	Tuple         =							sum(a_i[j] * base[j] for j in range(min(len(__UpperCamelCase       )							,						__UpperCamelCase       )       )       )

				A__       ,							A__  :	Optional[int]         =							0, 0
				A__  :	List[Any]         =							n - i

				A__  :	Any         =							memo.get(__UpperCamelCase       )

				if sub_memo is not None:
								A__  :	Optional[int]         =							sub_memo.get(__UpperCamelCase       )

								if jumps is not None and len(__UpperCamelCase       ) > 0:
												# find and make the largest jump without going over
												A__  :	List[Any]         =							-1
												for _k in range(len(__UpperCamelCase       ) - 1							,						-1							,						-1       ):
																if jumps[_k][2] <= k and jumps[_k][1] <= max_dn:
																				A__  :	List[str]         =							_k
																				break

												if max_jump >= 0:
																A__       ,							A__       ,							A__  :	List[Any]         =							jumps[max_jump]
																# since the difference between jumps is cached, add c
																A__  :	int         =							diff + c
																for j in range(min(__UpperCamelCase							,						len(__UpperCamelCase       )       )       ):
																				A__       ,							A__  :	List[str]         =							divmod(__UpperCamelCase							,						10       )
																if new_c > 0:
																				add(__UpperCamelCase							,						__UpperCamelCase							,						__UpperCamelCase       )

								else:
												A__  :	List[Any]         =							[]
				else:
								A__  :	Optional[Any]         =							{c: []}
								A__  :	int         =							sub_memo

				if dn >= max_dn or c + diff >= base[k]:
								return diff, dn

				if k > ks[0]:
								while True:
												# keep doing smaller jumps
												A__       ,							A__  :	str         =							next_term(__UpperCamelCase							,						k - 1							,						i + dn							,						__UpperCamelCase       )
												diff += _diff
												dn += terms_jumped

												if dn >= max_dn or c + diff >= base[k]:
																break
				else:
								# would be too small a jump, just compute sequential terms instead
								A__       ,							A__  :	str         =							compute(__UpperCamelCase							,						__UpperCamelCase							,						i + dn							,						__UpperCamelCase       )
								diff += _diff
								dn += terms_jumped

				A__  :	str         =							sub_memo[c]

				# keep jumps sorted by # of terms skipped
				A__  :	List[Any]         =							0
				while j < len(__UpperCamelCase       ):
								if jumps[j][1] > dn:
												break
								j += 1

				# cache the jump for this value digitsum(b) and c
				sub_memo[c].insert(__UpperCamelCase							,						(diff, dn, k)       )
				return (diff, dn)

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						int							,						__UpperCamelCase :						Optional[int]							,						__UpperCamelCase :						List[str]							,						__UpperCamelCase :						int       ) ->       Any:

				"""simple docstring"""







				if i >= n:
								return 0, i
				if k > len(__UpperCamelCase       ):
								a_i.extend([0 for _ in range(k - len(__UpperCamelCase       )       )]       )

				# note: a_i -> b * 10^k + c
				# ds_b -> digitsum(b)
				# ds_c -> digitsum(c)
				A__  :	Optional[Any]         =							i
				A__       ,							A__       ,							A__  :	Dict         =							0, 0, 0
				for j in range(len(__UpperCamelCase       )       ):
								if j >= k:
												ds_b += a_i[j]
								else:
												ds_c += a_i[j]

				while i < n:
								i += 1
								A__  :	int         =							ds_c + ds_b
								diff += addend
								A__  :	List[Any]         =							0
								for j in range(__UpperCamelCase       ):
												A__  :	Optional[Any]         =							a_i[j] + addend
												A__       ,							A__  :	List[str]         =							divmod(__UpperCamelCase							,						10       )

												ds_c += a_i[j]

								if addend > 0:
												break

				if addend > 0:
								add(__UpperCamelCase							,						__UpperCamelCase							,						__UpperCamelCase       )
				return diff, i - start_i

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						Dict							,						__UpperCamelCase :						List[Any]							,						__UpperCamelCase :						int       ) ->       Tuple:

				"""simple docstring"""







				for j in range(__UpperCamelCase							,						len(__UpperCamelCase       )       ):
								A__  :	Any         =							digits[j] + addend
								if s >= 10:
												A__       ,							A__  :	Union[str, Any]         =							divmod(__UpperCamelCase							,						10       )
												A__  :	Optional[int]         =							addend // 10 + quotient
								else:
												A__  :	Any         =							s
												A__  :	Dict         =							addend // 10

								if addend == 0:
												break

				while addend > 0:
								A__       ,							A__  :	Dict         =							divmod(__UpperCamelCase							,						10       )
								digits.append(__UpperCamelCase       )

def 				SCREAMING_SNAKE_CASE     (      __UpperCamelCase :						int = 10**15       ) ->       int:

				"""simple docstring"""







				A__  :	List[Any]         =							[1]
				A__  :	Dict         =							1
				A__  :	Tuple         =							0
				while True:
								A__       ,							A__  :	List[str]         =							next_term(__UpperCamelCase							,						20							,						i + dn							,						__UpperCamelCase       )
								dn += terms_jumped
								if dn == n - i:
												break

				A__  :	List[str]         =							0
				for j in range(len(__UpperCamelCase       )       ):
								a_n += digits[j] * 10**j
				return a_n


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