


"""simple docstring"""







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


a__       :							List[Any]        =  {
    '''configuration_poolformer''': [
        '''POOLFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''PoolFormerConfig''',
        '''PoolFormerOnnxConfig''',
    ]
}

try:
		if not is_vision_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		a__       :							Optional[int]        =  ['''PoolFormerFeatureExtractor''']
		a__       :							List[Any]        =  ['''PoolFormerImageProcessor''']

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		a__       :							Optional[int]        =  [
		    '''POOLFORMER_PRETRAINED_MODEL_ARCHIVE_LIST''',
		    '''PoolFormerForImageClassification''',
		    '''PoolFormerModel''',
		    '''PoolFormerPreTrainedModel''',
		]


if TYPE_CHECKING:
		from .configuration_poolformer import (
		    POOLFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
		    PoolFormerConfig,
		    PoolFormerOnnxConfig,
		)

		try:
				if not is_vision_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .feature_extraction_poolformer import PoolFormerFeatureExtractor
				from .image_processing_poolformer import PoolFormerImageProcessor

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_poolformer import (
				    POOLFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
				    PoolFormerForImageClassification,
				    PoolFormerModel,
				    PoolFormerPreTrainedModel,
				)


else:
		import sys

		a__       :							int        =  _LazyModule(__name__, globals()['''__file__'''], _import_structure)




"""simple docstring"""







from __future__ import annotations




def      UpperCAmelCase__ (lowerCAmelCase_     ):




					'''simple docstring'''


					__SCREAMING_SNAKE_CASE		     =       str(lowerCAmelCase_     )
					return n == n[::-1]




def      UpperCAmelCase__ (lowerCAmelCase_ = 100_0000     ):




					'''simple docstring'''


					__SCREAMING_SNAKE_CASE		     =       0

					for i in range(1						,		lowerCAmelCase_     ):
										if is_palindrome(lowerCAmelCase_     ) and is_palindrome(bin(lowerCAmelCase_     ).split("b"     )[1]     ):
															total += i
					return total


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