



'''simple docstring'''

import math_equivalence  # From: git+https://github.com/hendrycks/math.git

import datasets


__lowerCAmelCase						      =       '''\
@article{hendrycksmath2021,
  title={Measuring Mathematical Problem Solving With the MATH Dataset},
  author={Dan Hendrycks
    and Collin Burns
    and Saurav Kadavath
    and Akul Arora
    and Steven Basart
    and Eric Tang
    and Dawn Song
    and Jacob Steinhardt},
  journal={arXiv preprint arXiv:2103.03874},
  year={2021}
}
'''


__lowerCAmelCase						      =       '''\
This metric is used to assess performance on the Mathematics Aptitude Test of Heuristics (MATH) dataset.
It first canonicalizes the inputs (e.g., converting "1/2" to "\\frac{1}{2}") and then computes accuracy.
'''


__lowerCAmelCase						      =       r'''
Calculates accuracy after canonicalizing inputs.

Args:
    predictions: list of predictions to score. Each prediction
        is a string that contains natural language and LaTex.
    references: list of reference for each prediction. Each
        reference is a string that contains natural language
        and LaTex.
Returns:
    accuracy: accuracy after canonicalizing inputs
        (e.g., converting "1/2" to "\\frac{1}{2}")

Examples:
    >>> metric = datasets.load_metric("competition_math")
    >>> results = metric.compute(references=["\\frac{1}{2}"], predictions=["1/2"])
    >>> print(results)
    {\'accuracy\': 1.0}
'''

@datasets.utils.file_utils.add_end_docstrings(_DESCRIPTION      ,						_KWARGS_DESCRIPTION       )
class      __magic_name__						(   datasets.Metric       ):







							def 							__lowercase      (							self :	Optional[int]		):
									return datasets.MetricInfo(
									    description=_DESCRIPTION     ,citation=_CITATION     ,inputs_description=_KWARGS_DESCRIPTION     ,features=datasets.Features(
									        {
									            'predictions': datasets.Value('string'		),
									            'references': datasets.Value('string'		),
									        }		)     ,homepage='https://github.com/hendrycks/math'     ,codebase_urls=['https://github.com/hendrycks/math']     ,)







							def 							__lowercase      (							self :	Union[str, Any]     ,_UpperCAmelCase :	int     ,_UpperCAmelCase :	List[Any]		):
									_a					:				Any				=							0.0
									for i, j in zip(_UpperCAmelCase     ,_UpperCAmelCase		):
											n_correct += 1.0 if math_equivalence.is_equiv(_UpperCAmelCase     ,_UpperCAmelCase		) else 0.0
									_a					:				str				=							n_correct / len(_UpperCAmelCase		)
									return {
									    "accuracy": accuracy,
									}









'''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())))




