





'''simple docstring'''



snake_case_ :	dict[tuple[int, int, int], int]             =   {}



def 			lowercase__(		_UpperCamelCase	:			int			, _UpperCamelCase	:			int			, _UpperCamelCase	:			int					)-> int:






					"""simple docstring"""

					if late == 3 or absent == 2:
										return 0

					# if we have no days left, and have not failed any other rules,
					# we have a prize string
					if days == 0:
										return 1

					# No easy solution, so now we need to do the recursive calculation

					# First, check if the combination is already in the cache, and
					# if yes, return the stored value from there since we already
					# know the number of possible prize strings from this point on
					_UpperCamelCase									= (days, absent, late)
					if key in cache:
										return cache[key]

					# now we calculate the three possible ways that can unfold from
					# this point on, depending on our attendance today

					# 1) if we are late (but not absent), the "absent" counter stays as
					# it is, but the "late" counter increases by one
					_UpperCamelCase									= _calculate(days - 1			, __lowercase			, late + 1					)

					# 2) if we are absent, the "absent" counter increases by 1, and the
					# "late" counter resets to 0
					_UpperCamelCase									= _calculate(days - 1			, absent + 1			, 0					)

					# 3) if we are on time, this resets the "late" counter and keeps the
					# absent counter
					_UpperCamelCase									= _calculate(days - 1			, __lowercase			, 0					)

					_UpperCamelCase									= state_late + state_absent + state_ontime

					_UpperCamelCase									= prizestrings
					return prizestrings



def 			lowercase__(		_UpperCamelCase	:			int = 30					)-> int:






					"""simple docstring"""

					return _calculate(__lowercase			, absent=0			, late=0					)


if __name__ == "__main__":
			print(solution())











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


_UpperCamelCase			:	List[Any]								=logging.get_logger(__name__)

_UpperCamelCase			:	Optional[Any]								={
    'google/pegasus-large': 'https://huggingface.co/google/pegasus-large/resolve/main/config.json',
    # See all PEGASUS models at https://huggingface.co/models?filter=pegasus
}






class 						UpperCAmelCase__ (							__snake_case							):
		__snake_case      :       Optional[int]     =   "pegasus"
		__snake_case      :       List[str]     =   ["past_key_values"]
		__snake_case      :       Union[str, Any]     =   {"num_attention_heads": "encoder_attention_heads", "hidden_size": "d_model"}







		def __init__(					self       ,A__=50265       ,A__=1024       ,A__=12       ,A__=4096       ,A__=16       ,A__=12       ,A__=4096       ,A__=16       ,A__=0.0       ,A__=0.0       ,A__=True       ,A__=True       ,A__="gelu"       ,A__=1024       ,A__=0.1       ,A__=0.0       ,A__=0.0       ,A__=0.02       ,A__=0       ,A__=False       ,A__=0       ,A__=1       ,A__=1       ,**A__       ,):
						_A	:				List[str]   =      vocab_size
						_A	:				List[Any]   =      max_position_embeddings
						_A	:				Union[str, Any]   =      d_model
						_A	:				Union[str, Any]   =      encoder_ffn_dim
						_A	:				Union[str, Any]   =      encoder_layers
						_A	:				int   =      encoder_attention_heads
						_A	:				List[Any]   =      decoder_ffn_dim
						_A	:				Optional[int]   =      decoder_layers
						_A	:				Tuple   =      decoder_attention_heads
						_A	:				List[str]   =      dropout
						_A	:				Tuple   =      attention_dropout
						_A	:				Union[str, Any]   =      activation_dropout
						_A	:				int   =      activation_function
						_A	:				Union[str, Any]   =      init_std
						_A	:				Any   =      encoder_layerdrop
						_A	:				int   =      decoder_layerdrop
						_A	:				Tuple   =      use_cache
						_A	:				Dict   =      encoder_layers
						_A	:				List[str]   =      scale_embedding  # scale factor will be sqrt(d_model) if True
						super().__init__(
						    pad_token_id=A__       ,eos_token_id=A__       ,is_encoder_decoder=A__       ,decoder_start_token_id=A__       ,forced_eos_token_id=A__       ,**A__       ,)







		@property
		def  A__      (					self		):
						return self.encoder_attention_heads







		@property
		def  A__      (					self		):
						return self.d_model



