

from torch import nn







class 			lowercase    (	nn.Module      ):




				def __init__( self				,       snake_case				,       snake_case	):
											super().__init__()
											snake_case_          =   class_size
											snake_case_          =   embed_size
											# self.mlp1 = nn.Linear(embed_size, embed_size)
											# self.mlp2 = (nn.Linear(embed_size, class_size))
											snake_case_          =   nn.Linear(snake_case				,       snake_case	)




				def    a							( self				,       snake_case	):
											# hidden_state = nn.functional.relu(self.mlp1(hidden_state))
											# hidden_state = self.mlp2(hidden_state)
											snake_case_          =   self.mlp(snake_case	)
											return logits







from math import sqrt





def  __lowerCamelCase     (			UpperCamelCase__				):







							'''simple docstring'''






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





def  __lowerCamelCase     (			UpperCamelCase__ = 10000				):







							'''simple docstring'''






							snake_case_          =   sum(
							    i
							    for i in range(1       ,							UpperCamelCase__				)
							    if sum_of_divisors(sum_of_divisors(UpperCamelCase__				)				) == i and sum_of_divisors(UpperCamelCase__				) != i				)
							return total


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




