




'''simple docstring'''





import math
from collections.abc import Iterator
from itertools import takewhile


def 	UpperCamelCase_(      snake_case				:			Union[str, Any]	):

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


def 	UpperCamelCase_(      ):

							'''simple docstring'''






							snake_case_         = 2
							while True:
														if is_prime(lowercase_	):
																					yield num
														num += 1


def 	UpperCamelCase_(      snake_case				:			Optional[int] = 2_0_0_0_0_0_0	):

							'''simple docstring'''






							return sum(takewhile(lambda snake_case	: x < n				,							prime_generator()	)	)


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










from ...configuration_utils import PretrainedConfig
from ...utils import logging


_lowerCamelCase      :						str							=  logging.get_logger(__name__)

_lowerCamelCase      :						List[str]							=  {"""openai-gpt""": """https://huggingface.co/openai-gpt/resolve/main/config.json"""}


class 							UpperCamelCase_       (					UpperCAmelCase__	):

    '''simple docstring'''






    UpperCAmelCase__				    = '''openai-gpt'''
    UpperCAmelCase__				    = {
        '''max_position_embeddings''': '''n_positions''',
        '''hidden_size''': '''n_embd''',
        '''num_attention_heads''': '''n_head''',
        '''num_hidden_layers''': '''n_layer''',
    }


    def __init__(     self :      Union[str, Any]   ,					UpperCAmelCase__ :      Dict=40_478   ,					UpperCAmelCase__ :      str=512   ,					UpperCAmelCase__ :      Union[str, Any]=768   ,					UpperCAmelCase__ :      Optional[Any]=12   ,					UpperCAmelCase__ :      Any=12   ,					UpperCAmelCase__ :      Optional[Any]="gelu"   ,					UpperCAmelCase__ :      Any=0.1   ,					UpperCAmelCase__ :      List[str]=0.1   ,					UpperCAmelCase__ :      Tuple=0.1   ,					UpperCAmelCase__ :      List[str]=1e-5   ,					UpperCAmelCase__ :      int=0.02   ,					UpperCAmelCase__ :      Any="cls_index"   ,					UpperCAmelCase__ :      Optional[Any]=True   ,					UpperCAmelCase__ :      List[Any]=None   ,					UpperCAmelCase__ :      List[Any]=True   ,					UpperCAmelCase__ :      Optional[Any]=0.1   ,					**UpperCAmelCase__ :      Dict   ,					)		->Any:





           '''simple docstring'''

           A__ 					=       vocab_size
           A__ 					=       n_positions
           A__ 					=       n_embd
           A__ 					=       n_layer
           A__ 					=       n_head
           A__ 					=       afn
           A__ 					=       resid_pdrop
           A__ 					=       embd_pdrop
           A__ 					=       attn_pdrop
           A__ 					=       layer_norm_epsilon
           A__ 					=       initializer_range
           A__ 					=       summary_type
           A__ 					=       summary_use_proj
           A__ 					=       summary_activation
           A__ 					=       summary_first_dropout
           A__ 					=       summary_proj_to_labels
           super().__init__(**UpperCAmelCase__)


