
from math import sqrt




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




def 	UpperCamelCase__  (     SCREAMING_SNAKE_CASE_	:	int = 1_00_00       )  ->     int:
						_lowercase					       =					sum(
						    i
						    for i in range(1		,   SCREAMING_SNAKE_CASE_       )
						    if sum_of_divisors(sum_of_divisors(SCREAMING_SNAKE_CASE_       )       ) == i and sum_of_divisors(SCREAMING_SNAKE_CASE_       ) != i       )
						return total


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

import unittest

import numpy as np

from transformers.testing_utils import require_torch, require_vision
from transformers.utils import is_torch_available, is_vision_available

from ...test_image_processing_common import ImageProcessingSavingTestMixin, prepare_video_inputs


if is_torch_available():
		import torch

if is_vision_available():
		from PIL import Image

		from transformers import VivitImageProcessor



class    a_ (			unittest.TestCase    ):






			def __init__(      self				,			__UpperCamelCase				,			__UpperCamelCase=7				,			__UpperCamelCase=3				,			__UpperCamelCase=10				,			__UpperCamelCase=18				,			__UpperCamelCase=30				,			__UpperCamelCase=400				,			__UpperCamelCase=True				,			__UpperCamelCase=None				,			__UpperCamelCase=True				,			__UpperCamelCase=[0.5, 0.5, 0.5]				,			__UpperCamelCase=[0.5, 0.5, 0.5]				,			__UpperCamelCase=None				,			):
									_lowercase					       =					size if size is not None else {"""shortest_edge""": 18}
									_lowercase					       =					crop_size if crop_size is not None else {"""height""": 18, """width""": 18}

									_lowercase					       =					parent
									_lowercase					       =					batch_size
									_lowercase					       =					num_channels
									_lowercase					       =					num_frames
									_lowercase					       =					image_size
									_lowercase					       =					min_resolution
									_lowercase					       =					max_resolution
									_lowercase					       =					do_resize
									_lowercase					       =					size
									_lowercase					       =					do_normalize
									_lowercase					       =					image_mean
									_lowercase					       =					image_std
									_lowercase					       =					crop_size






			def    UpperCamelCase_				(      self  ):
									return {
									    "image_mean": self.image_mean,
									    "image_std": self.image_std,
									    "do_normalize": self.do_normalize,
									    "do_resize": self.do_resize,
									    "size": self.size,
									    "crop_size": self.crop_size,
									}







@require_torch
@require_vision
class    a_ (			_a					,			unittest.TestCase    ):
			a	:			str					   =							VivitImageProcessor if is_vision_available() else None






			def    UpperCamelCase_				(      self  ):
									_lowercase					       =					VivitImageProcessingTester(self  )






			@property
			def    UpperCamelCase_				(      self  ):
									return self.image_processor_tester.prepare_image_processor_dict()






			def    UpperCamelCase_				(      self  ):
									_lowercase					       =					self.image_processing_class(**self.image_processor_dict  )
									self.assertTrue(hasattr(__UpperCamelCase				,			"""image_mean"""  )  )
									self.assertTrue(hasattr(__UpperCamelCase				,			"""image_std"""  )  )
									self.assertTrue(hasattr(__UpperCamelCase				,			"""do_normalize"""  )  )
									self.assertTrue(hasattr(__UpperCamelCase				,			"""do_resize"""  )  )
									self.assertTrue(hasattr(__UpperCamelCase				,			"""do_center_crop"""  )  )
									self.assertTrue(hasattr(__UpperCamelCase				,			"""size"""  )  )






			def    UpperCamelCase_				(      self  ):
									_lowercase					       =					self.image_processing_class.from_dict(self.image_processor_dict  )
									self.assertEqual(image_processor.size				,			{"""shortest_edge""": 18}  )
									self.assertEqual(image_processor.crop_size				,			{"""height""": 18, """width""": 18}  )

									_lowercase					       =					self.image_processing_class.from_dict(self.image_processor_dict				,			size=42				,			crop_size=84  )
									self.assertEqual(image_processor.size				,			{"""shortest_edge""": 42}  )
									self.assertEqual(image_processor.crop_size				,			{"""height""": 84, """width""": 84}  )






			def    UpperCamelCase_				(      self  ):
									# Initialize image_processing
									_lowercase					       =					self.image_processing_class(**self.image_processor_dict  )
									# create random PIL videos
									_lowercase					       =					prepare_video_inputs(self.image_processor_tester				,			equal_resolution=__UpperCamelCase  )
									for video in video_inputs:
															self.assertIsInstance(__UpperCamelCase				,			__UpperCamelCase  )
															self.assertIsInstance(video[0]				,			Image.Image  )

									# Test not batched input
									_lowercase					       =					image_processing(video_inputs[0]				,			return_tensors="""pt"""  ).pixel_values
									self.assertEqual(
									    encoded_videos.shape				,			(
									        1,
									        self.image_processor_tester.num_frames,
									        self.image_processor_tester.num_channels,
									        self.image_processor_tester.crop_size["""height"""],
									        self.image_processor_tester.crop_size["""width"""],
									    )				,			)

									# Test batched
									_lowercase					       =					image_processing(__UpperCamelCase				,			return_tensors="""pt"""  ).pixel_values
									self.assertEqual(
									    encoded_videos.shape				,			(
									        self.image_processor_tester.batch_size,
									        self.image_processor_tester.num_frames,
									        self.image_processor_tester.num_channels,
									        self.image_processor_tester.crop_size["""height"""],
									        self.image_processor_tester.crop_size["""width"""],
									    )				,			)






			def    UpperCamelCase_				(      self  ):
									# Initialize image_processing
									_lowercase					       =					self.image_processing_class(**self.image_processor_dict  )
									# create random numpy tensors
									_lowercase					       =					prepare_video_inputs(self.image_processor_tester				,			equal_resolution=__UpperCamelCase				,			numpify=__UpperCamelCase  )
									for video in video_inputs:
															self.assertIsInstance(__UpperCamelCase				,			__UpperCamelCase  )
															self.assertIsInstance(video[0]				,			np.ndarray  )

									# Test not batched input
									_lowercase					       =					image_processing(video_inputs[0]				,			return_tensors="""pt"""  ).pixel_values
									self.assertEqual(
									    encoded_videos.shape				,			(
									        1,
									        self.image_processor_tester.num_frames,
									        self.image_processor_tester.num_channels,
									        self.image_processor_tester.crop_size["""height"""],
									        self.image_processor_tester.crop_size["""width"""],
									    )				,			)

									# Test batched
									_lowercase					       =					image_processing(__UpperCamelCase				,			return_tensors="""pt"""  ).pixel_values
									self.assertEqual(
									    encoded_videos.shape				,			(
									        self.image_processor_tester.batch_size,
									        self.image_processor_tester.num_frames,
									        self.image_processor_tester.num_channels,
									        self.image_processor_tester.crop_size["""height"""],
									        self.image_processor_tester.crop_size["""width"""],
									    )				,			)






			def    UpperCamelCase_				(      self  ):
									# Initialize image_processing
									_lowercase					       =					self.image_processing_class(**self.image_processor_dict  )
									# create random PyTorch tensors
									_lowercase					       =					prepare_video_inputs(self.image_processor_tester				,			equal_resolution=__UpperCamelCase				,			torchify=__UpperCamelCase  )
									for video in video_inputs:
															self.assertIsInstance(__UpperCamelCase				,			__UpperCamelCase  )
															self.assertIsInstance(video[0]				,			torch.Tensor  )

									# Test not batched input
									_lowercase					       =					image_processing(video_inputs[0]				,			return_tensors="""pt"""  ).pixel_values
									self.assertEqual(
									    encoded_videos.shape				,			(
									        1,
									        self.image_processor_tester.num_frames,
									        self.image_processor_tester.num_channels,
									        self.image_processor_tester.crop_size["""height"""],
									        self.image_processor_tester.crop_size["""width"""],
									    )				,			)

									# Test batched
									_lowercase					       =					image_processing(__UpperCamelCase				,			return_tensors="""pt"""  ).pixel_values
									self.assertEqual(
									    encoded_videos.shape				,			(
									        self.image_processor_tester.batch_size,
									        self.image_processor_tester.num_frames,
									        self.image_processor_tester.num_channels,
									        self.image_processor_tester.crop_size["""height"""],
									        self.image_processor_tester.crop_size["""width"""],
									    )				,			)