code: 
  """simple docstring"""
  
  
  
  
  
  
  
  import inspect
  import unittest
  
  from transformers import is_torch_available, is_vision_available
  from transformers.models.auto import get_values
  from transformers.testing_utils import require_torch, slow, torch_device
  
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_common import ModelTesterMixin, floats_tensor, ids_tensor
  from ...test_pipeline_mixin import PipelineTesterMixin
  
  
  if is_torch_available():
        import torch
  
        from transformers import MODEL_MAPPING, PoolFormerConfig, PoolFormerForImageClassification, PoolFormerModel
        from transformers.models.poolformer.modeling_poolformer import POOLFORMER_PRETRAINED_MODEL_ARCHIVE_LIST
  
  
  if is_vision_available():
        from PIL import Image
  
        from transformers import PoolFormerImageProcessor
  
  
  
  
  
  
  class     __a			(					lowerCAmelCase_			):
  
  
  
  
  
  
  
         def    _snake_case			(					self		):
  
  
  
            '''simple docstring'''
  
            _UpperCAmelCase   	=					self.config_class(**self.inputs_dict		)
            self.parent.assertTrue(hasattr(__SCREAMING_SNAKE_CASE							,"hidden_sizes"		)		)
            self.parent.assertTrue(hasattr(__SCREAMING_SNAKE_CASE							,"num_encoder_blocks"		)		)
  
  
  
  
  
  
  class     __a			:
  
  
  
  
  
  
  
         def __init__(					self							,lowerCamelCase_							,lowerCamelCase_=13							,lowerCamelCase_=64							,lowerCamelCase_=3							,lowerCamelCase_=4							,lowerCamelCase_=[2, 2, 2, 2]							,lowerCamelCase_=[8, 4, 2, 1]							,lowerCamelCase_=[16, 32, 64, 128]							,lowerCamelCase_=[1, 4, 8, 16]							,lowerCamelCase_=False							,lowerCamelCase_=True							,lowerCamelCase_="gelu"							,lowerCamelCase_=0.1							,lowerCamelCase_=0.0_2							,lowerCamelCase_=3							,lowerCamelCase_=None							,):
  
  
  
            '''simple docstring'''
  
            _UpperCAmelCase   	=					parent
            _UpperCAmelCase   	=					batch_size
            _UpperCAmelCase   	=					image_size
            _UpperCAmelCase   	=					num_channels
            _UpperCAmelCase   	=					num_encoder_blocks
            _UpperCAmelCase   	=					sr_ratios
            _UpperCAmelCase   	=					depths
            _UpperCAmelCase   	=					hidden_sizes
            _UpperCAmelCase   	=					downsampling_rates
            _UpperCAmelCase   	=					is_training
            _UpperCAmelCase   	=					use_labels
            _UpperCAmelCase   	=					hidden_act
            _UpperCAmelCase   	=					hidden_dropout_prob
            _UpperCAmelCase   	=					initializer_range
            _UpperCAmelCase   	=					num_labels
            _UpperCAmelCase   	=					scope
  
  
  
  
  
  
  
         def    _snake_case			(					self		):
  
  
  
            '''simple docstring'''
  
            _UpperCAmelCase   	=					floats_tensor([self.batch_size, self.num_channels, self.image_size, self.image_size]		)
  
            _UpperCAmelCase   	=					None
            if self.use_labels:
               _UpperCAmelCase   	=					ids_tensor([self.batch_size, self.image_size, self.image_size]							,self.num_labels		)
  
            _UpperCAmelCase   	=					PoolFormerConfig(
                image_size=self.image_size							,num_channels=self.num_channels							,num_encoder_blocks=self.num_encoder_blocks							,depths=self.depths							,hidden_sizes=self.hidden_sizes							,hidden_act=self.hidden_act							,hidden_dropout_prob=self.hidden_dropout_prob							,initializer_range=self.initializer_range							,)
  
            return config, pixel_values, labels
  
  
  
  
  
  
  
         def    _snake_case			(					self							,lowerCamelCase_							,lowerCamelCase_							,lowerCamelCase_		):
  
  
  
            '''simple docstring'''
  
            _UpperCAmelCase   	=					PoolFormerModel(config=__SCREAMING_SNAKE_CASE		)
            model.to(__SCREAMING_SNAKE_CASE		)
            model.eval()
            _UpperCAmelCase   	=					model(__SCREAMING_SNAKE_CASE		)
            _UpperCAmelCase   	=					_UpperCAmelCase   	=					self.image_size // 3_2.0
            self.parent.assertEqual(
                result.last_hidden_state.shape							,(self.batch_size, self.hidden_sizes[-1], expected_height, expected_width)		)
  
  
  
  
  
  
  
         def    _snake_case			(					self		):
  
  
  
            '''simple docstring'''
  
            _UpperCAmelCase   	=					self.prepare_config_and_inputs()
            _UpperCAmelCase	,							_UpperCAmelCase	,							_UpperCAmelCase   	=					config_and_inputs
            _UpperCAmelCase   	=					{"pixel_values": pixel_values}
            return config, inputs_dict
  
  
  
  
  
  
  @require_torch
  class     __a			(					lowerCAmelCase_				,	lowerCAmelCase_				,	unittest.TestCase			):
         _lowerCamelCase							:							Optional[Any]       =			(PoolFormerModel, PoolFormerForImageClassification) if is_torch_available() else ()
         _lowerCamelCase							:							Union[str, Any]       =			(
             {"""feature-extraction""": PoolFormerModel, """image-classification""": PoolFormerForImageClassification}
             if is_torch_available()
             else {}
         )
  
         _lowerCamelCase							:							Dict       =			False
         _lowerCamelCase							:							Optional[int]       =			False
         _lowerCamelCase							:							Optional[Any]       =			False
         _lowerCamelCase							:							str       =			False
         _lowerCamelCase							:							Optional[int]       =			False
  
  
  
  
  
  
  
         def    _snake_case			(					self		):
  
  
  
            '''simple docstring'''
  
            _UpperCAmelCase   	=					PoolFormerModelTester(self		)
            _UpperCAmelCase   	=					PoolFormerConfigTester(self							,config_class=__SCREAMING_SNAKE_CASE		)
  
  
  
  
  
  
  
         def    _snake_case			(					self		):
  
  
  
            '''simple docstring'''
  
            self.config_tester.run_common_tests()
  
  
  
  
  
  
  
         def    _snake_case			(					self		):
  
  
  
            '''simple docstring'''
  
            _UpperCAmelCase   	=					self.model_tester.prepare_config_and_inputs()
            self.model_tester.create_and_check_model(*__SCREAMING_SNAKE_CASE		)
  
  
  
  
  
  
  
         @unittest.skip("PoolFormer does not use inputs_embeds"		)
         def    _snake_case			(					self		):
  
  
  
            '''simple docstring'''
  
            pass
  
  
  
  
  
  
  
         @unittest.skip("PoolFormer does not have get_input_embeddings method and get_output_embeddings methods"		)
         def    _snake_case			(					self		):
  
  
  
            '''simple docstring'''
  
            pass
  
  
  
  
  
  
  
         def    _snake_case			(					self		):
  
  
  
            '''simple docstring'''
  
            def check_hidden_states_output(lowerCamelCase_							,lowerCamelCase_							,lowerCamelCase_		):
               _UpperCAmelCase   	=					model_class(__SCREAMING_SNAKE_CASE		)
               model.to(__SCREAMING_SNAKE_CASE		)
               model.eval()
  
               with torch.no_grad():
                  _UpperCAmelCase   	=					model(**self._prepare_for_class(__SCREAMING_SNAKE_CASE							,__SCREAMING_SNAKE_CASE		)		)
  
               _UpperCAmelCase   	=					outputs.hidden_states
  
               _UpperCAmelCase   	=					self.model_tester.num_encoder_blocks
               self.assertEqual(len(__SCREAMING_SNAKE_CASE		)							,__SCREAMING_SNAKE_CASE		)
  
               # verify the first hidden states (first block)
               self.assertListEqual(
                   list(hidden_states[0].shape[-3:]		)							,[
                       self.model_tester.hidden_sizes[0],
                       self.model_tester.image_size // 4,
                       self.model_tester.image_size // 4,
                   ]							,)
  
            _UpperCAmelCase	,							_UpperCAmelCase   	=					self.model_tester.prepare_config_and_inputs_for_common()
  
            for model_class in self.all_model_classes:
               _UpperCAmelCase   	=					True
               check_hidden_states_output(__SCREAMING_SNAKE_CASE							,__SCREAMING_SNAKE_CASE							,__SCREAMING_SNAKE_CASE		)
  
               # check that output_hidden_states also work using config
               del inputs_dict["output_hidden_states"]
               _UpperCAmelCase   	=					True
  
               check_hidden_states_output(__SCREAMING_SNAKE_CASE							,__SCREAMING_SNAKE_CASE							,__SCREAMING_SNAKE_CASE		)
  
  
  
  
  
  
  
         def    _snake_case			(					self		):
  
  
  
            '''simple docstring'''
  
            if not self.model_tester.is_training:
               return
  
            _UpperCAmelCase	,							_UpperCAmelCase   	=					self.model_tester.prepare_config_and_inputs_for_common()
            _UpperCAmelCase   	=					True
  
            for model_class in self.all_model_classes:
               if model_class in get_values(__SCREAMING_SNAKE_CASE		):
                  continue
               _UpperCAmelCase   	=					model_class(__SCREAMING_SNAKE_CASE		)
               model.to(__SCREAMING_SNAKE_CASE		)
               model.train()
               _UpperCAmelCase   	=					self._prepare_for_class(__SCREAMING_SNAKE_CASE							,__SCREAMING_SNAKE_CASE							,return_labels=__SCREAMING_SNAKE_CASE		)
               _UpperCAmelCase   	=					model(**__SCREAMING_SNAKE_CASE		).loss
               loss.backward()
  
  
  
  
  
  
  
         def    _snake_case			(					self		):
  
  
  
            '''simple docstring'''
  
            _UpperCAmelCase	,							_UpperCAmelCase   	=					self.model_tester.prepare_config_and_inputs_for_common()
  
            for model_class in self.all_model_classes:
               _UpperCAmelCase   	=					model_class(__SCREAMING_SNAKE_CASE		)
               _UpperCAmelCase   	=					inspect.signature(model.forward		)
               # signature.parameters is an OrderedDict => so arg_names order is deterministic
               _UpperCAmelCase   	=					[*signature.parameters.keys()]
  
               _UpperCAmelCase   	=					["pixel_values"]
               self.assertListEqual(arg_names[:1]							,__SCREAMING_SNAKE_CASE		)
  
  
  
  
  
  
  
         @slow
         def    _snake_case			(					self		):
  
  
  
            '''simple docstring'''
  
            for model_name in POOLFORMER_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
               _UpperCAmelCase   	=					PoolFormerModel.from_pretrained(__SCREAMING_SNAKE_CASE		)
               self.assertIsNotNone(__SCREAMING_SNAKE_CASE		)
  
  
  
  def 			__UpperCAmelCase		(		)     ->       Any:
     _UpperCAmelCase   	=					Image.open("./tests/fixtures/tests_samples/COCO/000000039769.png"				)
     return image
  
  
  
  
  
  
  @require_torch
  class     __a			(					unittest.TestCase			):
  
  
  
  
  
  
  
         @slow
         def    _snake_case			(					self		):
  
  
  
            '''simple docstring'''
  
            _UpperCAmelCase   	=					PoolFormerImageProcessor()
            _UpperCAmelCase   	=					PoolFormerForImageClassification.from_pretrained("sail/poolformer_s12"		).to(__SCREAMING_SNAKE_CASE		)
  
            _UpperCAmelCase   	=					image_processor(images=prepare_img()							,return_tensors="pt"		).to(__SCREAMING_SNAKE_CASE		)
  
            # forward pass
            with torch.no_grad():
               _UpperCAmelCase   	=					model(**__SCREAMING_SNAKE_CASE		)
  
            # verify the logits
            _UpperCAmelCase   	=					torch.Size((1, 1000)		)
            self.assertEqual(outputs.logits.shape							,__SCREAMING_SNAKE_CASE		)
  
            _UpperCAmelCase   	=					torch.tensor([-0.6_1_1_3, 0.1_6_8_5, -0.0_4_9_2]		).to(__SCREAMING_SNAKE_CASE		)
            self.assertTrue(torch.allclose(outputs.logits[0, :3]							,__SCREAMING_SNAKE_CASE							,atol=1e-4		)		)
  
  
style_context: 
  """simple docstring"""
  
  
  
  
  
  
  
  from math import floor, sqrt
  def 			__UpperCAmelCase		(		a_			:		int				)     ->       int:
     _UpperCAmelCase   	=					0.0
     _UpperCAmelCase   	=					1.0
     _UpperCAmelCase   	=					int(sqrt(a_				)				)
     _UpperCAmelCase   	=					root
     _UpperCAmelCase   	=					0
     while integer_part != 2 * root:
        _UpperCAmelCase   	=					denominator * integer_part - numerator
        _UpperCAmelCase   	=					(n - numerator**2) / denominator
        _UpperCAmelCase   	=					int((root + numerator) / denominator				)
        period += 1
     return period
  def 			__UpperCAmelCase		(		a_			:		int = 1_00_00				)     ->       int:
     _UpperCAmelCase   	=					0
     for i in range(2    ,  n + 1				):
        _UpperCAmelCase   	=					sqrt(a_				)
        if sr - floor(a_				) != 0 and continuous_fraction_period(a_				) % 2 == 1:
           count_odd_periods += 1
     return count_odd_periods
  
  
  if __name__ == "__main__":
    print(f'''{solution(int(input().strip()))}''')
  
  