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


__UpperCamelCase		:       List[str]									=     logging.get_logger(__name__)

__UpperCamelCase		:       Optional[int]									=     {
    'edbeeching/decision-transformer-gym-hopper-medium': (
        'https://huggingface.co/edbeeching/decision-transformer-gym-hopper-medium/resolve/main/config.json'
    ),
    # See all DecisionTransformer models at https://huggingface.co/models?filter=decision_transformer
}





class 					lowercase__						(   UpperCamelCase_):
						UpperCamelCase_     =		"""decision_transformer"""
						UpperCamelCase_     =		["""past_key_values"""]
						UpperCamelCase_     =		{
						    """max_position_embeddings""": """n_positions""",
						    """num_attention_heads""": """n_head""",
						    """num_hidden_layers""": """n_layer""",
						}


						def __init__(       self	:				Any    ,		UpperCamelCase__	:				int=17    ,		UpperCamelCase__	:				Optional[int]=4    ,		UpperCamelCase__	:				Optional[int]=128    ,		UpperCamelCase__	:				List[str]=4096    ,		UpperCamelCase__	:				Dict=True    ,		UpperCamelCase__	:				Tuple=1    ,		UpperCamelCase__	:				List[str]=1024    ,		UpperCamelCase__	:				Any=3    ,		UpperCamelCase__	:				List[Any]=1    ,		UpperCamelCase__	:				List[Any]=None    ,		UpperCamelCase__	:				Tuple="relu"    ,		UpperCamelCase__	:				Union[str, Any]=0.1    ,		UpperCamelCase__	:				Tuple=0.1    ,		UpperCamelCase__	:				Tuple=0.1    ,		UpperCamelCase__	:				List[Any]=1E-5    ,		UpperCamelCase__	:				Tuple=0.02    ,		UpperCamelCase__	:				Dict=True    ,		UpperCamelCase__	:				Optional[Any]=True    ,		UpperCamelCase__	:				List[Any]=5_0256    ,		UpperCamelCase__	:				str=5_0256    ,		UpperCamelCase__	:				Union[str, Any]=False    ,		UpperCamelCase__	:				List[str]=False    ,		**UpperCamelCase__	:				List[Any]    ,		):





												'''simple docstring'''





												SCREAMING_SNAKE_CASE							:    List[str]							=							state_dim
												SCREAMING_SNAKE_CASE							:    List[Any]							=							act_dim
												SCREAMING_SNAKE_CASE							:    Optional[int]							=							hidden_size
												SCREAMING_SNAKE_CASE							:    str							=							max_ep_len
												SCREAMING_SNAKE_CASE							:    int							=							action_tanh
												SCREAMING_SNAKE_CASE							:    Tuple							=							vocab_size
												SCREAMING_SNAKE_CASE							:    Optional[Any]							=							n_positions
												SCREAMING_SNAKE_CASE							:    Optional[Any]							=							n_layer
												SCREAMING_SNAKE_CASE							:    str							=							n_head
												SCREAMING_SNAKE_CASE							:    Union[str, Any]							=							n_inner
												SCREAMING_SNAKE_CASE							:    List[Any]							=							activation_function
												SCREAMING_SNAKE_CASE							:    str							=							resid_pdrop
												SCREAMING_SNAKE_CASE							:    List[str]							=							embd_pdrop
												SCREAMING_SNAKE_CASE							:    Union[str, Any]							=							attn_pdrop
												SCREAMING_SNAKE_CASE							:    List[str]							=							layer_norm_epsilon
												SCREAMING_SNAKE_CASE							:    int							=							initializer_range
												SCREAMING_SNAKE_CASE							:    Union[str, Any]							=							scale_attn_weights
												SCREAMING_SNAKE_CASE							:    Dict							=							use_cache
												SCREAMING_SNAKE_CASE							:    str							=							scale_attn_by_inverse_layer_idx
												SCREAMING_SNAKE_CASE							:    Union[str, Any]							=							reorder_and_upcast_attn

												SCREAMING_SNAKE_CASE							:    List[Any]							=							bos_token_id
												SCREAMING_SNAKE_CASE							:    Tuple							=							eos_token_id

												super().__init__(bos_token_id=UpperCamelCase__    ,		eos_token_id=UpperCamelCase__    ,		**UpperCamelCase__						)






from math import ceil
def       A	(    _lowercase = 1_001						):
						SCREAMING_SNAKE_CASE							:    Any							=							1

						for i in range(1		,  int(ceil(n / 2.0						)						)						):
												SCREAMING_SNAKE_CASE							:    Union[str, Any]							=							2 * i + 1
												SCREAMING_SNAKE_CASE							:    int							=							2 * i
												SCREAMING_SNAKE_CASE							:    List[str]							=							total + 4 * odd**2 - 6 * even

						return total


if __name__ == "__main__":
					import sys

					if len(sys.argv) == 1:
										print(solution())
					else:
										try:
															__UpperCamelCase		:       Dict									=     int(sys.argv[1])
															print(solution(n))
										except ValueError:
															print('Invalid entry - please enter a number')





