





"""simple docstring"""
import logging
import os
from dataclasses import dataclass
from typing import List, Optional, Union

import tqdm
from filelock import FileLock

from transformers import (
    BartTokenizer,
    BartTokenizerFast,
    DataProcessor,
    PreTrainedTokenizer,
    RobertaTokenizer,
    RobertaTokenizerFast,
    XLMRobertaTokenizer,
    is_tf_available,
    is_torch_available,
)


__UpperCamelCase     :						Optional[Any]						       =  logging.getLogger(__name__)







@dataclass(frozen=a__  )
class       a							:
 snake_case__             =       42
 snake_case__             =       42
 snake_case__             =       None
 snake_case__             =       None
 snake_case__             =       None







@dataclass(frozen=a__  )
class       a							:
 snake_case__             =       42
 snake_case__             =       None
 snake_case__             =       None
 snake_case__             =       None
 snake_case__             =       None


if is_torch_available():
       import torch
       from torch.utils.data import Dataset







       class       a							(   a__  ):
        snake_case__             =       42



        def __init__(     self				,       _snake_case				,       _snake_case				,       _snake_case				,       _snake_case = None				,       _snake_case=False				,       _snake_case = False				,       ):







         """simple docstring"""






         lowerCAmelCase    				= hans_processors[task]()

         lowerCAmelCase    				= os.path.join(
             _snake_case				,       'cached_{}_{}_{}_{}'.format(
                 'dev' if evaluate else 'train'				,       tokenizer.__class__.__name__				,       str(_snake_case     )				,       _snake_case				,       )				,       )
         lowerCAmelCase    				= processor.get_labels()
         if tokenizer.__class__ in (
             RobertaTokenizer,
             RobertaTokenizerFast,
             XLMRobertaTokenizer,
             BartTokenizer,
             BartTokenizerFast,
         ):
          # HACK(label indices are swapped in RoBERTa pretrained model)
          lowerCAmelCase				,lowerCAmelCase    				= label_list[2], label_list[1]
         lowerCAmelCase    				= label_list

         # Make sure only the first process in distributed training processes the dataset,
         # and the others will use the cache.
         lowerCAmelCase    				= cached_features_file + '.lock'
         with FileLock(_snake_case     ):
          if os.path.exists(_snake_case     ) and not overwrite_cache:
           logger.info(F'Loading features from cached file {cached_features_file}'     )
           lowerCAmelCase    				= torch.load(_snake_case     )
          else:
           logger.info(F'Creating features from dataset file at {data_dir}'     )

           lowerCAmelCase    				= (
               processor.get_dev_examples(_snake_case     ) if evaluate else processor.get_train_examples(_snake_case     )
           )

           logger.info('Training examples: %s'				,       len(_snake_case     )     )
           lowerCAmelCase    				= hans_convert_examples_to_features(_snake_case				,       _snake_case				,       _snake_case				,       _snake_case     )
           logger.info('Saving features into cached file %s'				,       _snake_case     )
           torch.save(self.features				,       _snake_case     )



        def __len__(     self     ):







         """simple docstring"""






         return len(self.features     )



        def __getitem__(     self				,       _snake_case     ):







         """simple docstring"""






         return self.features[i]



        def    UpperCamelCase__  (     self     ):







         """simple docstring"""






         return self.label_list


if is_tf_available():
       import tensorflow as tf







       class       a							:
        snake_case__             =       42



        def __init__(     self				,       _snake_case				,       _snake_case				,       _snake_case				,       _snake_case = 1_28				,       _snake_case=False				,       _snake_case = False				,       ):







         """simple docstring"""






         lowerCAmelCase    				= hans_processors[task]()
         lowerCAmelCase    				= processor.get_labels()
         if tokenizer.__class__ in (
             RobertaTokenizer,
             RobertaTokenizerFast,
             XLMRobertaTokenizer,
             BartTokenizer,
             BartTokenizerFast,
         ):
          # HACK(label indices are swapped in RoBERTa pretrained model)
          lowerCAmelCase				,lowerCAmelCase    				= label_list[2], label_list[1]
         lowerCAmelCase    				= label_list

         lowerCAmelCase    				= processor.get_dev_examples(_snake_case     ) if evaluate else processor.get_train_examples(_snake_case     )
         lowerCAmelCase    				= hans_convert_examples_to_features(_snake_case				,       _snake_case				,       _snake_case				,       _snake_case     )

         def gen():
          for ex_index, ex in tqdm.tqdm(enumerate(self.features     )				,       desc='convert examples to features'     ):
           if ex_index % 1_00_00 == 0:
            logger.info('Writing example %d of %d' % (ex_index, len(_snake_case     ))     )

           yield (
               {
                   "example_id": 0,
                   "input_ids": ex.input_ids,
                   "attention_mask": ex.attention_mask,
                   "token_type_ids": ex.token_type_ids,
               },
               ex.label,
           )

         lowerCAmelCase    				= tf.data.Dataset.from_generator(
             _snake_case				,       (
                 {
                     'example_id': tf.intaa,
                     'input_ids': tf.intaa,
                     'attention_mask': tf.intaa,
                     'token_type_ids': tf.intaa,
                 },
                 tf.intaa,
             )				,       (
                 {
                     'example_id': tf.TensorShape([]     ),
                     'input_ids': tf.TensorShape([None, None]     ),
                     'attention_mask': tf.TensorShape([None, None]     ),
                     'token_type_ids': tf.TensorShape([None, None]     ),
                 },
                 tf.TensorShape([]     ),
             )				,       )



        def    UpperCamelCase__  (     self     ):







         """simple docstring"""






         return self.dataset



        def __len__(     self     ):







         """simple docstring"""






         return len(self.features     )



        def __getitem__(     self				,       _snake_case     ):







         """simple docstring"""






         return self.features[i]



        def    UpperCamelCase__  (     self     ):







         """simple docstring"""






         return self.label_list







class       a							(   a__  ):



 def    UpperCamelCase__  (     self				,       _snake_case     ):







  """simple docstring"""






  return self._create_examples(self._read_tsv(os.path.join(_snake_case				,       'heuristics_train_set.txt'     )     )				,       'train'     )



 def    UpperCamelCase__  (     self				,       _snake_case     ):







  """simple docstring"""






  return self._create_examples(self._read_tsv(os.path.join(_snake_case				,       'heuristics_evaluation_set.txt'     )     )				,       'dev'     )



 def    UpperCamelCase__  (     self     ):







  """simple docstring"""






  return ["contradiction", "entailment", "neutral"]



 def    UpperCamelCase__  (     self				,       _snake_case				,       _snake_case     ):







  """simple docstring"""






  lowerCAmelCase    				= []
  for i, line in enumerate(_snake_case     ):
   if i == 0:
    continue
   lowerCAmelCase    				= '%s-%s' % (set_type, line[0])
   lowerCAmelCase    				= line[5]
   lowerCAmelCase    				= line[6]
   lowerCAmelCase    				= line[7][2:] if line[7].startswith('ex'     ) else line[7]
   lowerCAmelCase    				= line[0]
   examples.append(InputExample(guid=_snake_case				,       text_a=_snake_case				,       text_b=_snake_case				,       label=_snake_case				,       pairID=_snake_case     )     )
  return examples


def 		_SCREAMING_SNAKE_CASE			(_UpperCAmelCase					:    List[InputExample]  ,     _UpperCAmelCase					:    List[str]  ,     _UpperCAmelCase					:    int  ,     _UpperCAmelCase					:    PreTrainedTokenizer  ,     ):
 lowerCAmelCase    				= {label: i for i, label in enumerate(_UpperCAmelCase			)}

 lowerCAmelCase    				= []
 for ex_index, example in tqdm.tqdm(enumerate(_UpperCAmelCase			)  ,     desc='convert examples to features'			):
  if ex_index % 1_0000 == 0:
   logger.info('Writing example %d' % (ex_index)			)

  lowerCAmelCase    				= tokenizer(
      example.text_a  ,     example.text_b  ,     add_special_tokens=_UpperCAmelCase  ,     max_length=_UpperCAmelCase  ,     padding='max_length'  ,     truncation=_UpperCAmelCase  ,     return_overflowing_tokens=_UpperCAmelCase  ,     )

  lowerCAmelCase    				= label_map[example.label] if example.label in label_map else 0

  lowerCAmelCase    				= int(example.pairID			)

  features.append(InputFeatures(**_UpperCAmelCase  ,     label=_UpperCAmelCase  ,     pairID=_UpperCAmelCase			)			)

 for i, example in enumerate(examples[:5]			):
  logger.info('*** Example ***'			)
  logger.info(F'guid: {example}'			)
  logger.info(F'features: {features[i]}'			)

 return features


__UpperCamelCase     :						Optional[Any]						       =  {
    '''hans''': 3,
}




__UpperCamelCase     :						int						       =  {
    '''hans''': HansProcessor,
}












'''simple docstring'''




from math import sqrt



def 		__A		(  lowerCamelCase_	):


		"""simple docstring"""



		SCREAMING_SNAKE_CASE :				str		=			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 		__A		(  lowerCamelCase_ = 1_00_00	):


		"""simple docstring"""



		SCREAMING_SNAKE_CASE :				str		=			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())))



