



'''simple docstring'''

import torch
from torch import nn
from transformers import CLIPPreTrainedModel, CLIPVisionModel

from ...models.attention import BasicTransformerBlock
from ...utils import logging


__lowerCAmelCase						      =       logging.get_logger(__name__)  # pylint: disable=invalid-name

class      __magic_name__						(   _UpperCamelCase       ):







							def __init__(							self :	Optional[int]     ,_UpperCAmelCase :	Dict     ,_UpperCAmelCase :	Optional[Any]=768		):
									super().__init__(_UpperCAmelCase		)
									_a					:				List[str]				=							proj_size

									_a					:				Dict				=							CLIPVisionModel(_UpperCAmelCase		)
									_a					:				Tuple				=							PaintByExampleMapper(_UpperCAmelCase		)
									_a					:				Optional[int]				=							nn.LayerNorm(config.hidden_size		)
									_a					:				Optional[int]				=							nn.Linear(config.hidden_size     ,self.proj_size		)

									# uncondition for scaling
									_a					:				List[Any]				=							nn.Parameter(torch.randn((1, 1, self.proj_size)		)		)







							def 							__lowercase      (							self :	int     ,_UpperCAmelCase :	int     ,_UpperCAmelCase :	int=False		):
									_a					:				Tuple				=							self.model(pixel_values=_UpperCAmelCase		)
									_a					:				str				=							clip_output.pooler_output
									_a					:				List[Any]				=							self.mapper(latent_states[:, None]		)
									_a					:				Any				=							self.final_layer_norm(_UpperCAmelCase		)
									_a					:				Optional[Any]				=							self.proj_out(_UpperCAmelCase		)
									if return_uncond_vector:
											return latent_states, self.uncond_vector

									return latent_states

class      __magic_name__						(   nn.Module       ):







							def __init__(							self :	Optional[Any]     ,_UpperCAmelCase :	Union[str, Any]		):
									super().__init__()
									_a					:				List[Any]				=							(config.num_hidden_layers + 1) // 5
									_a					:				List[str]				=							config.hidden_size
									_a					:				str				=							1
									_a					:				List[str]				=							nn.ModuleList(
									    [
									        BasicTransformerBlock(_UpperCAmelCase     ,_UpperCAmelCase     ,_UpperCAmelCase     ,activation_fn='gelu'     ,attention_bias=_UpperCAmelCase		)
									        for _ in range(_UpperCAmelCase		)
									    ]		)







							def 							__lowercase      (							self :	Tuple     ,_UpperCAmelCase :	str		):
									for block in self.blocks:
											_a					:				List[Any]				=							block(_UpperCAmelCase		)

									return hidden_states









'''simple docstring'''

from math import sqrt



def 					__lowerCamelCase					(				lowerCAmelCase_  )      ->				int:
		_a					:				Dict				=							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_ = 10000  )      ->				int:
		_a					:				Union[str, Any]				=							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())))




