"""simple docstring"""




from typing import List, Optional, Tuple

from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_herbert import HerbertTokenizer


__lowerCAmelCase    :							int													=						logging.get_logger(__name__)

__lowerCAmelCase    :							Union[str, Any]													=						{"vocab_file": "vocab.json", "merges_file": "merges.txt", "tokenizer_file": "tokenizer.json"}

__lowerCAmelCase    :							Optional[int]													=						{
    "vocab_file": {
        "allegro/herbert-base-cased": "https://huggingface.co/allegro/herbert-base-cased/resolve/main/vocab.json"
    },
    "merges_file": {
        "allegro/herbert-base-cased": "https://huggingface.co/allegro/herbert-base-cased/resolve/main/merges.txt"
    },
}

__lowerCAmelCase    :							Optional[Any]													=						{"allegro/herbert-base-cased": 5_14}
__lowerCAmelCase    :							List[str]													=						{}

class       a_      (     __UpperCamelCase			):
					UpperCamelCase_ :	Optional[int]			=    VOCAB_FILES_NAMES
					UpperCamelCase_ :	Union[str, Any]			=    PRETRAINED_VOCAB_FILES_MAP
					UpperCamelCase_ :	List[Any]			=    PRETRAINED_INIT_CONFIGURATION
					UpperCamelCase_ :	Optional[int]			=    PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
					UpperCamelCase_ :	List[str]			=    HerbertTokenizer




					def __init__(	self						:     Union[str, Any]  ,						snake_case__						:     List[str]=None  ,						snake_case__						:     List[Any]=None  ,						snake_case__						:     Any=None  ,						snake_case__						:     Dict="<s>"  ,						snake_case__						:     Optional[Any]="<unk>"  ,						snake_case__						:     Optional[int]="<pad>"  ,						snake_case__						:     List[str]="<mask>"  ,						snake_case__						:     Dict="</s>"  ,						**snake_case__						:     int  ,						):
							super().__init__(
							    snake_case__  ,						snake_case__  ,						tokenizer_file=snake_case__  ,						cls_token=snake_case__  ,						unk_token=snake_case__  ,						pad_token=snake_case__  ,						mask_token=snake_case__  ,						sep_token=snake_case__  ,						**snake_case__  ,						)




					def 						_SCREAMING_SNAKE_CASE						(	self						:     Union[str, Any]  ,						snake_case__						:     List[int]  ,						snake_case__						:     Optional[List[int]] = None     ):
							lowerCAmelCase__        =   [self.cls_token_id]
							lowerCAmelCase__        =   [self.sep_token_id]
							if token_ids_a is None:
									return cls + token_ids_a + sep

							return cls + token_ids_a + sep + token_ids_a + sep




					def 						_SCREAMING_SNAKE_CASE						(	self						:     str  ,						snake_case__						:     List[int]  ,						snake_case__						:     Optional[List[int]] = None  ,						snake_case__						:     bool = False     ):
							if already_has_special_tokens:
									return super().get_special_tokens_mask(
									    token_ids_a=snake_case__  ,						token_ids_a=snake_case__  ,						already_has_special_tokens=snake_case__     )

							if token_ids_a is None:
									return [1] + ([0] * len(snake_case__     )) + [1]
							return [1] + ([0] * len(snake_case__     )) + [1] + ([0] * len(snake_case__     )) + [1]




					def 						_SCREAMING_SNAKE_CASE						(	self						:     Optional[Any]  ,						snake_case__						:     List[int]  ,						snake_case__						:     Optional[List[int]] = None     ):
							lowerCAmelCase__        =   [self.sep_token_id]
							lowerCAmelCase__        =   [self.cls_token_id]

							if token_ids_a is None:
									return len(cls + token_ids_a + sep     ) * [0]
							return len(cls + token_ids_a + sep     ) * [0] + len(token_ids_a + sep     ) * [1]




					def 						_SCREAMING_SNAKE_CASE						(	self						:     Tuple  ,						snake_case__						:     str  ,						snake_case__						:     Optional[str] = None     ):
							lowerCAmelCase__        =   self._tokenizer.model.save(snake_case__  ,						name=snake_case__     )
							return tuple(snake_case__     )





"""simple docstring"""




def 							_UpperCAmelCase		(       lowerCamelCase__ = 50     ):





		"""simple docstring"""




		lowerCAmelCase__        =   [[0] * 3 for _ in range(length + 1     )]

		for row_length in range(length + 1     ):
				for tile_length in range(2			,  5     ):
						for tile_start in range(row_length - tile_length + 1     ):
								different_colour_ways_number[row_length][tile_length - 2] += (
								    different_colour_ways_number[row_length - tile_start - tile_length][
								        tile_length - 2
								    ]
								    + 1
								)

		return sum(different_colour_ways_number[length]     )


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




