




"""simple docstring"""


import itertools
import math


def 					UpperCAmelCase__       (snake_case__							:					int    ):
  """simple docstring"""

  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(snake_case__    ) + 1    )		,   6    ):
    if number % i == 0 or number % (i + 2) == 0:
      return False
  return True


def 					UpperCAmelCase__       ():
  """simple docstring"""

  _snake_case							:		str								=  2
  while True:
    if is_prime(snake_case__    ):
      yield num
    num += 1


def 					UpperCAmelCase__       (snake_case__							:					int = 1_00_01    ):
  """simple docstring"""

  return next(itertools.islice(prime_generator()		,   nth - 1		,   snake_case__    )    )


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








"""simple docstring"""


from __future__ import annotations


def 					UpperCAmelCase__       (snake_case__							:					list[int]		,   snake_case__							:					int    ):
  """simple docstring"""

  if len(snake_case__    ) < k or k < 0:
    raise ValueError("""Invalid Input"""    )
  _snake_case							:		Optional[int]								=  sum(array[:k]    )
  for i in range(len(snake_case__    ) - k    ):
    _snake_case							:		Optional[Any]								=  current_sum - array[i] + array[i + k]
    _snake_case							:		List[str]								=  max(snake_case__		,   snake_case__    )
  return max_sum


if __name__ == "__main__":
     from doctest import testmod
     from random import randint

     testmod()
     A_						=				[randint(-10_00, 10_00) for i in range(1_00)]
     A_						=				randint(0, 1_10)
     print(F'''The maximum sum of {k} consecutive elements is {max_sum_in_array(array,k)}''')


