

"""simple docstring"""




from typing import Dict

from .base import GenericTensor, Pipeline







class   __lowercase      (     __lowerCamelCase       ):

  def  __lowercase							(	self		:      int       ,A		:      Dict=None       ,A		:      Optional[Any]=None       ,A		:      Any=None       ,**A		:      Dict     ):






   '''simple docstring'''
   if tokenize_kwargs is None:
    UpperCAmelCase__       :	List[Any]        =       {}

   if truncation is not None:
    if "truncation" in tokenize_kwargs:
     raise ValueError(
         """truncation parameter defined twice (given as keyword argument as well as in tokenize_kwargs)"""     )
    UpperCAmelCase__       :	List[str]        =       truncation

   UpperCAmelCase__       :	Union[str, Any]        =       tokenize_kwargs

   UpperCAmelCase__       :	List[Any]        =       {}
   if return_tensors is not None:
    UpperCAmelCase__       :	Union[str, Any]        =       return_tensors

   return preprocess_params, {}, postprocess_params

  def  __lowercase							(	self		:      Optional[int]       ,A		:      str       ,**A		:      Dict     ):






   '''simple docstring'''
   UpperCAmelCase__       :	Dict        =       self.framework
   UpperCAmelCase__       :	Optional[int]        =       self.tokenizer(A       ,return_tensors=A       ,**A     )
   return model_inputs

  def  __lowercase							(	self		:      Optional[int]       ,A		:      int     ):






   '''simple docstring'''
   UpperCAmelCase__       :	str        =       self.model(**A     )
   return model_outputs

  def  __lowercase							(	self		:      Union[str, Any]       ,A		:      Dict       ,A		:      Dict=False     ):






   '''simple docstring'''
   # [0] is the first available tensor, logits or last_hidden_state.
   if return_tensors:
    return model_outputs[0]
   if self.framework == "pt":
    return model_outputs[0].tolist()
   elif self.framework == "tf":
    return model_outputs[0].numpy().tolist()




  def __call__(	self		:      Union[str, Any]       ,*A		:      Tuple       ,**A		:      Optional[int]     ):






   '''simple docstring'''
   return super().__call__(*A       ,**A     )








def    __lowerCamelCase      (					UpperCamelCase__ = 1000 ):







							'''simple docstring'''






							snake_case_     							=       2**power
							snake_case_     							=       0
							while n:
														snake_case_							,       snake_case_     							=       r + n % 10, n // 10
							return r


if __name__ == "__main__":
					print(solution(int(str(input()).strip())))




