

'''simple docstring'''
def  a__       (    _SCREAMING_SNAKE_CASE   :       int				)     ->					int:


	"""simple docstring"""





	UpperCAmelCase_     :      List[str]						=  0
	while num > 0:
		digit_sum += num % 10
		num //= 10
	return digit_sum


def  a__       (    _SCREAMING_SNAKE_CASE   :       int = 1_00				)     ->					int:


	"""simple docstring"""





	UpperCAmelCase_     :      Optional[int]						=  1
	UpperCAmelCase_     :      Any						=  2

	for i in range(2	,				max_n + 1				):
		UpperCAmelCase_     :      Optional[int]						=  pre_numerator
		UpperCAmelCase_     :      int						=  2 * i // 3 if i % 3 == 0 else 1
		UpperCAmelCase_     :      Any						=  cur_numerator
		UpperCAmelCase_     :      List[str]						=  e_cont * pre_numerator + temp

	return sum_digits(_SCREAMING_SNAKE_CASE				)


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






"""simple docstring"""

from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding
class   _UpperCAmelCase				(		SCREAMING_SNAKE_CASE_				):
      __SCREAMING_SNAKE_CASE :				List[Any]				   =						["image_processor", "tokenizer"]
      __SCREAMING_SNAKE_CASE :				Dict				   =						"AutoImageProcessor"
      __SCREAMING_SNAKE_CASE :				Optional[int]				   =						"AutoTokenizer"




      def __init__(				self ,							lowercase_ ,							lowercase_				)    ->       List[str]:
          super().__init__(lowercase_ ,							lowercase_				)
          UpperCAmelCase          =       self.image_processor




      def __call__(				self ,							lowercase_=None ,							lowercase_=None ,							lowercase_=None ,							**lowercase_				)    ->       Any:

          if text is None and images is None:
              raise ValueError('You have to specify either text or images. Both cannot be none.'				)

          if text is not None:
              UpperCAmelCase          =       self.tokenizer(lowercase_ ,							return_tensors=lowercase_ ,							**lowercase_				)

          if images is not None:
              UpperCAmelCase          =       self.image_processor(lowercase_ ,							return_tensors=lowercase_ ,							**lowercase_				)

          if text is not None and images is not None:
              UpperCAmelCase          =       image_features.pixel_values
              return encoding
          elif text is not None:
              return encoding
          else:
              return BatchEncoding(data=dict(**lowercase_				) ,							tensor_type=lowercase_				)




      def      a_   (				self ,							*lowercase_ ,							**lowercase_				)    ->       Optional[Any]:
          return self.tokenizer.batch_decode(*lowercase_ ,							**lowercase_				)




      def      a_   (				self ,							*lowercase_ ,							**lowercase_				)    ->       Optional[int]:
          return self.tokenizer.decode(*lowercase_ ,							**lowercase_				)




      @property
      def      a_   (				self				)    ->       Optional[int]:
          return ["input_ids", "attention_mask", "pixel_values"]



