





'''simple docstring'''



import copy
import os
from typing import Union

from ...configuration_utils import PretrainedConfig
from ...utils import logging


_SCREAMING_SNAKE_CASE   =      logging.get_logger(__name__)

_SCREAMING_SNAKE_CASE   =      {
    '''BAAI/AltCLIP''': '''https://huggingface.co/BAAI/AltCLIP/resolve/main/config.json''',
    # See all AltCLIP models at https://huggingface.co/models?filter=altclip
}






class 							__lowercase    ( lowerCAmelCase__  ):







	'''simple docstring'''

	a      :			str     =    "altclip_text_model"


	def __init__(self       ,_lowerCamelCase=250002       ,_lowerCamelCase=1024       ,_lowerCamelCase=24       ,_lowerCamelCase=16       ,_lowerCamelCase=4096       ,_lowerCamelCase="gelu"       ,_lowerCamelCase=0.1       ,_lowerCamelCase=0.1       ,_lowerCamelCase=514       ,_lowerCamelCase=1       ,_lowerCamelCase=0.0_2       ,_lowerCamelCase=0.0_2       ,_lowerCamelCase=1E-0_5       ,_lowerCamelCase=1       ,_lowerCamelCase=0       ,_lowerCamelCase=2       ,_lowerCamelCase="absolute"       ,_lowerCamelCase=True       ,_lowerCamelCase=768       ,**_lowerCamelCase       ,)							->							List[str]:







				'''simple docstring'''





				super().__init__(pad_token_id=_lowerCamelCase       ,bos_token_id=_lowerCamelCase       ,eos_token_id=_lowerCamelCase       ,**_lowerCamelCase	)

				__lowercase			  =							vocab_size
				__lowercase			  =							hidden_size
				__lowercase			  =							num_hidden_layers
				__lowercase			  =							num_attention_heads
				__lowercase			  =							hidden_act
				__lowercase			  =							intermediate_size
				__lowercase			  =							hidden_dropout_prob
				__lowercase			  =							attention_probs_dropout_prob
				__lowercase			  =							max_position_embeddings
				__lowercase			  =							type_vocab_size
				__lowercase			  =							initializer_range
				__lowercase			  =							initializer_factor
				__lowercase			  =							layer_norm_eps
				__lowercase			  =							position_embedding_type
				__lowercase			  =							use_cache
				__lowercase			  =							project_dim






class 							__lowercase    ( lowerCAmelCase__  ):







	'''simple docstring'''

	a      :			int     =    "altclip_vision_model"


	def __init__(self       ,_lowerCamelCase=768       ,_lowerCamelCase=3072       ,_lowerCamelCase=512       ,_lowerCamelCase=12       ,_lowerCamelCase=12       ,_lowerCamelCase=3       ,_lowerCamelCase=224       ,_lowerCamelCase=32       ,_lowerCamelCase="quick_gelu"       ,_lowerCamelCase=1E-5       ,_lowerCamelCase=0.0       ,_lowerCamelCase=0.0_2       ,_lowerCamelCase=1.0       ,**_lowerCamelCase       ,)							->							Dict:







				'''simple docstring'''





				super().__init__(**_lowerCamelCase	)

				__lowercase			  =							hidden_size
				__lowercase			  =							intermediate_size
				__lowercase			  =							projection_dim
				__lowercase			  =							num_hidden_layers
				__lowercase			  =							num_attention_heads
				__lowercase			  =							num_channels
				__lowercase			  =							patch_size
				__lowercase			  =							image_size
				__lowercase			  =							initializer_range
				__lowercase			  =							initializer_factor
				__lowercase			  =							attention_dropout
				__lowercase			  =							layer_norm_eps
				__lowercase			  =							hidden_act


	@classmethod
	def   _UpperCAmelCase       (cls       ,_lowerCamelCase       ,**_lowerCamelCase	)							->							"PretrainedConfig":







				'''simple docstring'''





				cls._set_token_in_kwargs(_lowerCamelCase	)

				__lowercase  ,						__lowercase			  =							cls.get_config_dict(_lowerCamelCase       ,**_lowerCamelCase	)

				# get the vision config dict if we are loading from AltCLIPConfig
				if config_dict.get('''model_type'''	) == "altclip":
							__lowercase			  =							config_dict['''vision_config''']

				if "model_type" in config_dict and hasattr(cls       ,'''model_type'''	) and config_dict["model_type"] != cls.model_type:
							logger.warning(
							    f"You are using a model of type {config_dict['model_type']} to instantiate a model of type "
							    f"{cls.model_type}. This is not supported for all configurations of models and can yield errors."	)

				return cls.from_dict(_lowerCamelCase       ,**_lowerCamelCase	)






class 							__lowercase    ( lowerCAmelCase__  ):







	'''simple docstring'''

	a      :			Optional[Any]     =    "altclip"
	a      :			Optional[Any]     =    True


	def __init__(self       ,_lowerCamelCase=None       ,_lowerCamelCase=None       ,_lowerCamelCase=768       ,_lowerCamelCase=2.6_5_9_2       ,**_lowerCamelCase	)							->							List[str]:







				'''simple docstring'''





				__lowercase			  =							kwargs.pop('''text_config_dict'''       ,_lowerCamelCase	)
				__lowercase			  =							kwargs.pop('''vision_config_dict'''       ,_lowerCamelCase	)

				super().__init__(**_lowerCamelCase	)

				# Instead of simply assigning `[text|vision]_config_dict` to `[text|vision]_config`, we use the values in
				# `[text|vision]_config_dict` to update the values in `[text|vision]_config`. The values should be same in most
				# cases, but we don't want to break anything regarding `_config_dict` that existed before commit `8827e1b2`.
				if text_config_dict is not None:
							if text_config is None:
										__lowercase			  =							{}

							# This is the complete result when using `text_config_dict`.
							__lowercase			  =							AltCLIPTextConfig(**_lowerCamelCase	).to_dict()

							# Give a warning if the values exist in both `_text_config_dict` and `text_config` but being different.
							for key, value in _text_config_dict.items():
										if key in text_config and value != text_config[key] and key not in ["transformers_version"]:
													# If specified in `text_config_dict`
													if key in text_config_dict:
																__lowercase			  =							(
																    f"`{key}` is found in both `text_config_dict` and `text_config` but with different values. "
																    f"The value `text_config_dict[\"{key}\"]` will be used instead."
																)
													# If inferred from default argument values (just to be super careful)
													else:
																__lowercase			  =							(
																    f"`text_config_dict` is provided which will be used to initialize `AltCLIPTextConfig`. The "
																    f"value `text_config[\"{key}\"]` will be overriden."
																)
													logger.warning(_lowerCamelCase	)

            # Update all values in `text_config` with the ones in `_text_config_dict`.
							text_config.update(_text_config_dict	)

				if vision_config_dict is not None:
							if vision_config is None:
										__lowercase			  =							{}

							# This is the complete result when using `vision_config_dict`.
							__lowercase			  =							AltCLIPVisionConfig(**_lowerCamelCase	).to_dict()
							# convert keys to string instead of integer
							if "id2label" in _vision_config_dict:
										__lowercase			  =							{
										    str(_lowerCamelCase	): value for key, value in _vision_config_dict['''id2label'''].items()
										}

							# Give a warning if the values exist in both `_vision_config_dict` and `vision_config` but being different.
							for key, value in _vision_config_dict.items():
										if key in vision_config and value != vision_config[key] and key not in ["transformers_version"]:
													# If specified in `vision_config_dict`
													if key in vision_config_dict:
																__lowercase			  =							(
																    f"`{key}` is found in both `vision_config_dict` and `vision_config` but with different "
																    f"values. The value `vision_config_dict[\"{key}\"]` will be used instead."
																)
													# If inferred from default argument values (just to be super careful)
													else:
																__lowercase			  =							(
																    f"`vision_config_dict` is provided which will be used to initialize `AltCLIPVisionConfig`. "
																    f"The value `vision_config[\"{key}\"]` will be overriden."
																)
													logger.warning(_lowerCamelCase	)

            # Update all values in `vision_config` with the ones in `_vision_config_dict`.
							vision_config.update(_vision_config_dict	)

				if text_config is None:
							__lowercase			  =							{}
							logger.info('''`text_config` is `None`. Initializing the `AltCLIPTextConfig` with default values.'''	)

				if vision_config is None:
							__lowercase			  =							{}
							logger.info('''`vision_config` is `None`. initializing the `AltCLIPVisionConfig` with default values.'''	)

				__lowercase			  =							AltCLIPTextConfig(**_lowerCamelCase	)
				__lowercase			  =							AltCLIPVisionConfig(**_lowerCamelCase	)

				__lowercase			  =							projection_dim
				__lowercase			  =							logit_scale_init_value
				__lowercase			  =							1.0


	@classmethod
	def   _UpperCAmelCase       (cls       ,_lowerCamelCase       ,_lowerCamelCase       ,**_lowerCamelCase	)							->							Union[str, Any]:







				'''simple docstring'''





				return cls(text_config=text_config.to_dict()       ,vision_config=vision_config.to_dict()       ,**_lowerCamelCase	)


	def   _UpperCAmelCase       (self	)							->							Tuple:







				'''simple docstring'''





				__lowercase			  =							copy.deepcopy(self.__dict__	)
				__lowercase			  =							self.text_config.to_dict()
				__lowercase			  =							self.vision_config.to_dict()
				__lowercase			  =							self.__class__.model_type
				return output












'''simple docstring'''



from math import sqrt




def 				_lowerCAmelCase  (			lowerCamelCase_     :					int			):
			__lowercase			  =							0
			for i in range(1						,    int(sqrt(lowerCamelCase_			) + 1			)			):
						if n % i == 0 and i != sqrt(lowerCamelCase_			):
									total += i + n // i
						elif i == sqrt(lowerCamelCase_			):
									total += i
			return total - n




def 				_lowerCAmelCase  (			lowerCamelCase_     :					int = 1_0_0_0_0			):
			__lowercase			  =							sum(
			    i
			    for i in range(1						,    lowerCamelCase_			)
			    if sum_of_divisors(sum_of_divisors(lowerCamelCase_			)			) == i and sum_of_divisors(lowerCamelCase_			) != i			)
			return total


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





