




def 		lowerCAmelCase_ (						lowerCamelCase = 1000 ):
				__magic_name__						:						Optional[int]										=2**power
				__magic_name__						:						int										=0
				while n:
								__magic_name__					,			__magic_name__						:						List[str]										=r + n % 10, n // 10
				return r


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







"""simple docstring"""

from typing import Union

from ..utils import add_end_docstrings, is_torch_available, is_vision_available, logging
from .base import PIPELINE_INIT_ARGS, Pipeline


if is_vision_available():
    from PIL import Image

    from ..image_utils import load_image

if is_torch_available():
    from ..models.auto.modeling_auto import MODEL_FOR_VISUAL_QUESTION_ANSWERING_MAPPING

_UpperCamelCase		     =    logging.get_logger(__name__)






@add_end_docstrings(__magic_name__       )
class 			__a					(						__magic_name__       ):





       """simple docstring"""


       def __init__(   self			,					*snake_case			,					**snake_case   ):





        """simple docstring"""

        super().__init__(*snake_case			,					**snake_case   )
        self.check_model_type(snake_case   )






       def 			SCREAMING_SNAKE_CASE_	(   self			,					snake_case=None			,					snake_case=None			,					snake_case=None			,					**snake_case   ):





        """simple docstring"""

        lowerCAmelCase__			,						lowerCAmelCase__   :				List[Any] 			=				{}, {}
        if padding is not None:
         lowerCAmelCase__   :				Dict 			=				padding
        if truncation is not None:
         lowerCAmelCase__   :				Tuple 			=				truncation
        if top_k is not None:
         lowerCAmelCase__   :				str 			=				top_k
        return preprocess_params, {}, postprocess_params






       def __call__(   self			,					snake_case			,					snake_case = None			,					**snake_case   ):





        """simple docstring"""

        if isinstance(snake_case			,					(Image.Image, str)   ) and isinstance(snake_case			,					snake_case   ):
         lowerCAmelCase__   :				int 			=				{"image": image, "question": question}
        else:
         lowerCAmelCase__   :				Optional[int] 			=				image
        lowerCAmelCase__   :				Optional[Any] 			=				super().__call__(snake_case			,					**snake_case   )
        return results






       def 			SCREAMING_SNAKE_CASE_	(   self			,					snake_case			,					snake_case=False			,					snake_case=False   ):





        """simple docstring"""

        lowerCAmelCase__   :				Union[str, Any] 			=				load_image(inputs["image"]   )
        lowerCAmelCase__   :				str 			=				self.tokenizer(
            inputs["question"]			,					return_tensors=self.framework			,					padding=snake_case			,					truncation=snake_case   )
        lowerCAmelCase__   :				int 			=				self.image_processor(images=snake_case			,					return_tensors=self.framework   )
        model_inputs.update(snake_case   )
        return model_inputs






       def 			SCREAMING_SNAKE_CASE_	(   self			,					snake_case   ):





        """simple docstring"""

        lowerCAmelCase__   :				Optional[int] 			=				self.model(**snake_case   )
        return model_outputs






       def 			SCREAMING_SNAKE_CASE_	(   self			,					snake_case			,					snake_case=5   ):





        """simple docstring"""

        if top_k > self.model.config.num_labels:
         lowerCAmelCase__   :				List[Any] 			=				self.model.config.num_labels

        if self.framework == "pt":
         lowerCAmelCase__   :				Optional[int] 			=				model_outputs.logits.sigmoid()[0]
         lowerCAmelCase__			,						lowerCAmelCase__   :				Optional[int] 			=				probs.topk(snake_case   )
        else:
         raise ValueError(F"""Unsupported framework: {self.framework}"""   )

        lowerCAmelCase__   :				int 			=				scores.tolist()
        lowerCAmelCase__   :				str 			=				ids.tolist()
        return [{"score": score, "answer": self.model.config.idalabel[_id]} for score, _id in zip(snake_case			,					snake_case   )]






