
'''simple docstring'''
from __future__ import annotations

import math

import numpy as np
from numpy.linalg import norm







def 		A_(     A						:		np.ndarray		,     A						:		np.ndarray):
							return math.sqrt(sum(pow(a - b		,     2) for a, b in zip(A		,     A)))







def 		A_(     A						:		np.ndarray		,     A						:		np.ndarray):

							if dataset.ndim != value_array.ndim:
														UpperCamelCase   			=     (
														    'Wrong input data\'s dimensions... '
														    f'''dataset : {dataset.ndim}, value_array : {value_array.ndim}'''
														)
														raise ValueError(A)

							try:
														if dataset.shape[1] != value_array.shape[1]:
																					UpperCamelCase   			=     (
																					    'Wrong input data\'s shape... '
																					    f'''dataset : {dataset.shape[1]}, value_array : {value_array.shape[1]}'''
																					)
																					raise ValueError(A)
							except IndexError:
														if dataset.ndim != value_array.ndim:
																					raise TypeError('Wrong shape')

							if dataset.dtype != value_array.dtype:
														UpperCamelCase   			=     (
														    'Input data have different datatype... '
														    f'''dataset : {dataset.dtype}, value_array : {value_array.dtype}'''
														)
														raise TypeError(A)

							UpperCamelCase   			=     []

							for value in value_array:
														UpperCamelCase   			=     euclidean(A		,     dataset[0])
														UpperCamelCase   			=     dataset[0].tolist()

														for dataset_value in dataset[1:]:
																					UpperCamelCase   			=     euclidean(A		,     A)

																					if dist > temp_dist:
																												UpperCamelCase   			=     temp_dist
																												UpperCamelCase   			=     dataset_value.tolist()

														answer.append([vector, dist])

							return answer







def 		A_(     A						:		np.ndarray		,     A						:		np.ndarray):
							return np.dot(A		,     A) / (norm(A) * norm(A))


if __name__ == "__main__":
						import doctest

						doctest.testmod()







'''simple docstring'''




from __future__ import annotations


def    lowerCamelCase__		(    SCREAMING_SNAKE_CASE   : int | str    ):
  UpperCAmelCase    				=						str(SCREAMING_SNAKE_CASE    )
  return n == n[::-1]


def    lowerCamelCase__		(    SCREAMING_SNAKE_CASE   : int = 100_0000    ):
  UpperCAmelCase    				=						0

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


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


