'''simple docstring'''

import json
from typing import List, Optional, Tuple

from tokenizers import pre_tokenizers, processors

from ...tokenization_utils_base import AddedToken, BatchEncoding
from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging
from .tokenization_bart import BartTokenizer


__a:			Optional[Any]	       =       logging.get_logger(__name__)


__a:			str	       =       {"""vocab_file""": """vocab.json""", """merges_file""": """merges.txt""", """tokenizer_file""": """tokenizer.json"""}

# See all BART models at https://huggingface.co/models?filter=bart
__a:			Any	       =       {
    """vocab_file""": {
        """facebook/bart-base""": """https://huggingface.co/facebook/bart-base/resolve/main/vocab.json""",
        """facebook/bart-large""": """https://huggingface.co/facebook/bart-large/resolve/main/vocab.json""",
        """facebook/bart-large-mnli""": """https://huggingface.co/facebook/bart-large-mnli/resolve/main/vocab.json""",
        """facebook/bart-large-cnn""": """https://huggingface.co/facebook/bart-large-cnn/resolve/main/vocab.json""",
        """facebook/bart-large-xsum""": """https://huggingface.co/facebook/bart-large-xsum/resolve/main/vocab.json""",
        """yjernite/bart_eli5""": """https://huggingface.co/yjernite/bart_eli5/resolve/main/vocab.json""",
    },
    """merges_file""": {
        """facebook/bart-base""": """https://huggingface.co/facebook/bart-base/resolve/main/merges.txt""",
        """facebook/bart-large""": """https://huggingface.co/facebook/bart-large/resolve/main/merges.txt""",
        """facebook/bart-large-mnli""": """https://huggingface.co/facebook/bart-large-mnli/resolve/main/merges.txt""",
        """facebook/bart-large-cnn""": """https://huggingface.co/facebook/bart-large-cnn/resolve/main/merges.txt""",
        """facebook/bart-large-xsum""": """https://huggingface.co/facebook/bart-large-xsum/resolve/main/merges.txt""",
        """yjernite/bart_eli5""": """https://huggingface.co/yjernite/bart_eli5/resolve/main/merges.txt""",
    },
    """tokenizer_file""": {
        """facebook/bart-base""": """https://huggingface.co/facebook/bart-base/resolve/main/tokenizer.json""",
        """facebook/bart-large""": """https://huggingface.co/facebook/bart-large/resolve/main/tokenizer.json""",
        """facebook/bart-large-mnli""": """https://huggingface.co/facebook/bart-large-mnli/resolve/main/tokenizer.json""",
        """facebook/bart-large-cnn""": """https://huggingface.co/facebook/bart-large-cnn/resolve/main/tokenizer.json""",
        """facebook/bart-large-xsum""": """https://huggingface.co/facebook/bart-large-xsum/resolve/main/tokenizer.json""",
        """yjernite/bart_eli5""": """https://huggingface.co/yjernite/bart_eli5/resolve/main/tokenizer.json""",
    },
}

__a:			Optional[Any]	       =       {
    """facebook/bart-base""": 10_24,
    """facebook/bart-large""": 10_24,
    """facebook/bart-large-mnli""": 10_24,
    """facebook/bart-large-cnn""": 10_24,
    """facebook/bart-large-xsum""": 10_24,
    """yjernite/bart_eli5""": 10_24,
}



class       UpperCAmelCase  (						a__ ):





       '''simple docstring'''



       SCREAMING_SNAKE_CASE 		=   VOCAB_FILES_NAMES
       SCREAMING_SNAKE_CASE 		=   PRETRAINED_VOCAB_FILES_MAP
       SCREAMING_SNAKE_CASE 		=   PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
       SCREAMING_SNAKE_CASE 		=   ["input_ids", "attention_mask"]
       SCREAMING_SNAKE_CASE 		=   BartTokenizer

       def __init__(						self     ,       __lowerCAmelCase=None     ,       __lowerCAmelCase=None     ,       __lowerCAmelCase=None     ,       __lowerCAmelCase="replace"     ,       __lowerCAmelCase="<s>"     ,       __lowerCAmelCase="</s>"     ,       __lowerCAmelCase="</s>"     ,       __lowerCAmelCase="<s>"     ,       __lowerCAmelCase="<unk>"     ,       __lowerCAmelCase="<pad>"     ,       __lowerCAmelCase="<mask>"     ,       __lowerCAmelCase=False     ,       __lowerCAmelCase=True     ,       **__lowerCAmelCase     ,       )  ->  str:
        super().__init__(
            __lowerCAmelCase     ,       __lowerCAmelCase     ,       tokenizer_file=__lowerCAmelCase     ,       errors=__lowerCAmelCase     ,       bos_token=__lowerCAmelCase     ,       eos_token=__lowerCAmelCase     ,       sep_token=__lowerCAmelCase     ,       cls_token=__lowerCAmelCase     ,       unk_token=__lowerCAmelCase     ,       pad_token=__lowerCAmelCase     ,       mask_token=__lowerCAmelCase     ,       add_prefix_space=__lowerCAmelCase     ,       trim_offsets=__lowerCAmelCase     ,       **__lowerCAmelCase     ,       )

        lowercase__    :   str						= json.loads(self.backend_tokenizer.pre_tokenizer.__getstate__()			)
        if pre_tok_state.get('''add_prefix_space'''     ,       __lowerCAmelCase			) != add_prefix_space:
         lowercase__    :   Tuple						= getattr(__lowerCAmelCase     ,       pre_tok_state.pop('''type'''			)			)
         lowercase__    :   Union[str, Any]						= add_prefix_space
         lowercase__    :   int						= pre_tok_class(**__lowerCAmelCase			)

        lowercase__    :   List[Any]						= add_prefix_space

        # the pre_tokenizer is already updated in the GPT2TokenizerFast `__init__`
        lowercase__    :   Any						= '''post_processor'''
        lowercase__    :   Optional[Any]						= getattr(self.backend_tokenizer     ,       __lowerCAmelCase     ,       __lowerCAmelCase			)
        if tokenizer_component_instance:
         lowercase__    :   str						= json.loads(tokenizer_component_instance.__getstate__()			)

         # The lists 'sep' and 'cls' must be cased in tuples for the object `post_processor_class`
         if "sep" in state:
          lowercase__    :   int						= tuple(state['''sep''']			)
         if "cls" in state:
          lowercase__    :   str						= tuple(state['''cls''']			)

         lowercase__    :   Any						= False

         if state.get('''add_prefix_space'''     ,       __lowerCAmelCase			) != add_prefix_space:
          lowercase__    :   Union[str, Any]						= add_prefix_space
          lowercase__    :   str						= True

         if state.get('''trim_offsets'''     ,       __lowerCAmelCase			) != trim_offsets:
          lowercase__    :   Optional[int]						= trim_offsets
          lowercase__    :   Dict						= True

         if changes_to_apply:
          lowercase__    :   Tuple						= getattr(__lowerCAmelCase     ,       state.pop('''type'''			)			)
          lowercase__    :   int						= component_class(**__lowerCAmelCase			)
          setattr(self.backend_tokenizer     ,       __lowerCAmelCase     ,       __lowerCAmelCase			)

       @property
       def _lowerCAmelCase(						self			)  ->  str:
        if self._mask_token is None:
         if self.verbose:
          logger.error('''Using mask_token, but it is not set yet.'''			)
         return None
        return str(self._mask_token			)

       @mask_token.setter
       def _lowerCAmelCase(						self     ,       __lowerCAmelCase			)  ->  Optional[Any]:
        lowercase__    :   str						= AddedToken(__lowerCAmelCase     ,       lstrip=__lowerCAmelCase     ,       rstrip=__lowerCAmelCase			) if isinstance(__lowerCAmelCase     ,       __lowerCAmelCase			) else value
        lowercase__    :   Optional[int]						= value

       def _lowerCAmelCase(						self     ,       *__lowerCAmelCase     ,       **__lowerCAmelCase			)  ->  BatchEncoding:
        lowercase__    :   str						= kwargs.get('''is_split_into_words'''     ,       __lowerCAmelCase			)

        if is_split_into_words and not self.add_prefix_space:
         raise ValueError(
             F"""You need to instantiate {self.__class__.__name__} with add_prefix_space=True """
             '''to use it with pretokenized inputs.'''			)

        return super()._batch_encode_plus(*__lowerCAmelCase     ,       **__lowerCAmelCase			)

       def _lowerCAmelCase(						self     ,       *__lowerCAmelCase     ,       **__lowerCAmelCase			)  ->  BatchEncoding:
        lowercase__    :   Tuple						= kwargs.get('''is_split_into_words'''     ,       __lowerCAmelCase			)

        if is_split_into_words and not self.add_prefix_space:
         raise ValueError(
             F"""You need to instantiate {self.__class__.__name__} with add_prefix_space=True """
             '''to use it with pretokenized inputs.'''			)

        return super()._encode_plus(*__lowerCAmelCase     ,       **__lowerCAmelCase			)

       def _lowerCAmelCase(						self     ,       __lowerCAmelCase     ,       __lowerCAmelCase = None			)  ->  Tuple[str]:
        lowercase__    :   Union[str, Any]						= self._tokenizer.model.save(__lowerCAmelCase     ,       name=__lowerCAmelCase			)
        return tuple(__lowerCAmelCase			)

       def _lowerCAmelCase(						self     ,       __lowerCAmelCase     ,       __lowerCAmelCase=None			)  ->  Any:
        lowercase__    :   List[str]						= [self.bos_token_id] + token_ids_a + [self.eos_token_id]
        if token_ids_a is None:
         return output

        return output + [self.eos_token_id] + token_ids_a + [self.eos_token_id]


       def _lowerCAmelCase(						self     ,       __lowerCAmelCase     ,       __lowerCAmelCase = None			)  ->  List[int]:
        lowercase__    :   List[str]						= [self.sep_token_id]
        lowercase__    :   List[Any]						= [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 + sep + token_ids_a + sep			) * [0]


'''simple docstring'''

def       __UpperCamelCase	(       ):
 lowercase__    :   Any						= [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

 lowercase__    :   Any						= 6
 lowercase__    :   Optional[Any]						= 1
 lowercase__    :   int						= 1901

 lowercase__    :   List[str]						= 0

 while year < 2001:
  day += 7

  if (year % 4 == 0 and year % 100 != 0) or (year % 400 == 0):
   if day > days_per_month[month - 1] and month != 2:
    month += 1
    lowercase__    :   List[Any]						= day - days_per_month[month - 2]
   elif day > 29 and month == 2:
    month += 1
    lowercase__    :   Any						= day - 29
  else:
   if day > days_per_month[month - 1]:
    month += 1
    lowercase__    :   List[Any]						= day - days_per_month[month - 2]

  if month > 12:
   year += 1
   lowercase__    :   Dict						= 1

  if year < 2001 and day == 1:
   sundays += 1
 return sundays


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

