






'''simple docstring'''

import unittest

import numpy as np
import torch

from .utils_summarization import build_mask, compute_token_type_ids, process_story, truncate_or_pad






class        a_		(    unittest.TestCase       ):

  def 						A__		(   self   )						->   Union[str, Any]:



        """simple docstring"""






        UpperCamelCase       						=      10

  def 						A__		(   self   )						->   Optional[Any]:



        """simple docstring"""






        UpperCamelCase       						=      [1, 2, 3, 4]
        UpperCamelCase       						=      [1, 2, 3, 4, 0, 0, 0, 0, 0, 0]
        self.assertEqual(truncate_or_pad(_SCREAMING_SNAKE_CASE    ,	self.block_size    ,	0   )    ,	_SCREAMING_SNAKE_CASE   )

  def 						A__		(   self   )						->   List[str]:



        """simple docstring"""






        UpperCamelCase       						=      [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
        UpperCamelCase       						=      [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
        self.assertEqual(truncate_or_pad(_SCREAMING_SNAKE_CASE    ,	self.block_size    ,	0   )    ,	_SCREAMING_SNAKE_CASE   )

  def 						A__		(   self   )						->   Optional[Any]:



        """simple docstring"""






        UpperCamelCase       						=      [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
        UpperCamelCase       						=      [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
        self.assertEqual(truncate_or_pad(_SCREAMING_SNAKE_CASE    ,	self.block_size    ,	0   )    ,	_SCREAMING_SNAKE_CASE   )

  def 						A__		(   self   )						->   Dict:



        """simple docstring"""






        UpperCamelCase       						=      """It was the year of Our Lord one thousand seven hundred and
        seventy-five.\n\nSpiritual revelations were conceded to England at that
        favoured period, as at this."""
        UpperCamelCase						,UpperCamelCase       						=      process_story(_SCREAMING_SNAKE_CASE   )
        self.assertEqual(_SCREAMING_SNAKE_CASE    ,	[]   )

  def 						A__		(   self   )						->   Tuple:



        """simple docstring"""






        UpperCamelCase       						=      """"""
        UpperCamelCase						,UpperCamelCase       						=      process_story(_SCREAMING_SNAKE_CASE   )
        self.assertEqual(_SCREAMING_SNAKE_CASE    ,	[]   )
        self.assertEqual(_SCREAMING_SNAKE_CASE    ,	[]   )

  def 						A__		(   self   )						->   str:



        """simple docstring"""






        UpperCamelCase       						=      (
            """It was the year of Our Lord one thousand seven hundred and """
            """seventy-five\n\nSpiritual revelations were conceded to England """
            """at that favoured period, as at this.\n@highlight\n\nIt was the best of times"""
        )
        UpperCamelCase						,UpperCamelCase       						=      process_story(_SCREAMING_SNAKE_CASE   )

        UpperCamelCase       						=      [
            """It was the year of Our Lord one thousand seven hundred and seventy-five.""",
            """Spiritual revelations were conceded to England at that favoured period, as at this.""",
        ]
        self.assertEqual(_SCREAMING_SNAKE_CASE    ,	_SCREAMING_SNAKE_CASE   )

        UpperCamelCase       						=      ["""It was the best of times."""]
        self.assertEqual(_SCREAMING_SNAKE_CASE    ,	_SCREAMING_SNAKE_CASE   )

  def 						A__		(   self   )						->   str:



        """simple docstring"""






        UpperCamelCase       						=      torch.tensor([1, 2, 3, 4]   )
        UpperCamelCase       						=      torch.tensor([1, 1, 1, 1]   )
        np.testing.assert_array_equal(build_mask(_SCREAMING_SNAKE_CASE    ,	0   ).numpy()    ,	expected.numpy()   )

  def 						A__		(   self   )						->   Optional[int]:



        """simple docstring"""






        UpperCamelCase       						=      torch.tensor([1, 2, 3, 4, 23, 23, 23]   )
        UpperCamelCase       						=      torch.tensor([1, 1, 1, 1, 0, 0, 0]   )
        np.testing.assert_array_equal(build_mask(_SCREAMING_SNAKE_CASE    ,	23   ).numpy()    ,	expected.numpy()   )

  def 						A__		(   self   )						->   Tuple:



        """simple docstring"""






        UpperCamelCase       						=      torch.tensor([8, 2, 3, 4, 1, 1, 1]   )
        UpperCamelCase       						=      torch.tensor([1, 1, 1, 1, 0, 0, 0]   )
        np.testing.assert_array_equal(build_mask(_SCREAMING_SNAKE_CASE    ,	1   ).numpy()    ,	expected.numpy()   )


  def 						A__		(   self   )						->   Optional[int]:



        """simple docstring"""






        UpperCamelCase       						=      101
        UpperCamelCase       						=      torch.tensor([[1, 2, 3, 4, 5, 6], [1, 2, 3, 101, 5, 6], [1, 101, 3, 4, 101, 6]]   )
        UpperCamelCase       						=      torch.tensor([[1, 1, 1, 1, 1, 1], [1, 1, 1, 0, 0, 0], [1, 0, 0, 0, 1, 1]]   )

        UpperCamelCase       						=      compute_token_type_ids(_SCREAMING_SNAKE_CASE    ,	_SCREAMING_SNAKE_CASE   )
        np.testing.assert_array_equal(_SCREAMING_SNAKE_CASE    ,	_SCREAMING_SNAKE_CASE   )








'''simple docstring'''

from math import sqrt







def 					lowercase__				(   __UpperCamelCase					)->				int:
      UpperCamelCase       						=      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 					lowercase__				(   __UpperCamelCase = 10000					)->				int:
      UpperCamelCase       						=      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())))
