


from __future__ import annotations

def 		snake_case_   (				lowercase__     :    str       ,     lowercase__     :    dict[str, str]     ):






				'''simple docstring'''






				_lowerCAmelCase						,							_lowerCAmelCase						,							_lowerCAmelCase  						="""""", """""", """"""
				_lowerCAmelCase  						=[]

				for character in message_part:
								tmp.append(character_to_number[character]     )

				for each in tmp:
								one += each[0]
								two += each[1]
								three += each[2]

				return one + two + three

def 		snake_case_   (				lowercase__     :    str       ,     lowercase__     :    dict[str, str]     ):






				'''simple docstring'''






				_lowerCAmelCase						,							_lowerCAmelCase  						="""""", """"""
				_lowerCAmelCase  						=[]

				for character in message_part:
								this_part += character_to_number[character]

				for digit in this_part:
								tmp += digit
								if len(lowercase__     ) == len(lowercase__     ):
												result.append(lowercase__     )
												_lowerCAmelCase  						=""""""

				return result[0], result[1], result[2]

def 		snake_case_   (				lowercase__     :    str       ,     lowercase__     :    str     ):






				'''simple docstring'''






				_lowerCAmelCase  						=alphabet.replace(""" """       ,     """"""     ).upper()
				_lowerCAmelCase  						=message.replace(""" """       ,     """"""     ).upper()

				# Check length and characters
				if len(lowercase__     ) != 27:
								raise KeyError("""Length of alphabet has to be 27."""     )
				for each in message:
								if each not in alphabet:
												raise ValueError("""Each message character has to be included in alphabet!"""     )

    # Generate dictionares
				_lowerCAmelCase  						=(
				    """111""",
				    """112""",
				    """113""",
				    """121""",
				    """122""",
				    """123""",
				    """131""",
				    """132""",
				    """133""",
				    """211""",
				    """212""",
				    """213""",
				    """221""",
				    """222""",
				    """223""",
				    """231""",
				    """232""",
				    """233""",
				    """311""",
				    """312""",
				    """313""",
				    """321""",
				    """322""",
				    """323""",
				    """331""",
				    """332""",
				    """333""",
				)
				_lowerCAmelCase  						={}
				_lowerCAmelCase  						={}
				for letter, number in zip(lowercase__       ,     lowercase__     ):
								_lowerCAmelCase  						=number
								_lowerCAmelCase  						=letter

				return message, alphabet, character_to_number, number_to_character

def 		snake_case_   (				lowercase__     :    str       ,     lowercase__     :    str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ."       ,     lowercase__     :    int = 5     ):






				'''simple docstring'''






				_lowerCAmelCase						,							_lowerCAmelCase						,							_lowerCAmelCase						,							_lowerCAmelCase  						=__prepare(
				    lowercase__       ,     lowercase__     )
				_lowerCAmelCase						,							_lowerCAmelCase  						="""""", """"""

				for i in range(0       ,     len(lowercase__     ) + 1       ,     lowercase__     ):
								encrypted_numeric += __encrypt_part(
								    message[i : i + period]       ,     lowercase__     )

				for i in range(0       ,     len(lowercase__     )       ,     3     ):
								encrypted += number_to_character[encrypted_numeric[i : i + 3]]

				return encrypted

def 		snake_case_   (				lowercase__     :    str       ,     lowercase__     :    str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ."       ,     lowercase__     :    int = 5     ):






				'''simple docstring'''






				_lowerCAmelCase						,							_lowerCAmelCase						,							_lowerCAmelCase						,							_lowerCAmelCase  						=__prepare(
				    lowercase__       ,     lowercase__     )
				_lowerCAmelCase  						=[]
				_lowerCAmelCase  						=""""""

				for i in range(0       ,     len(lowercase__     ) + 1       ,     lowercase__     ):
								_lowerCAmelCase						,							_lowerCAmelCase						,							_lowerCAmelCase  						=__decrypt_part(message[i : i + period]       ,     lowercase__     )

								for j in range(0       ,     len(lowercase__     )     ):
												decrypted_numeric.append(a[j] + b[j] + c[j]     )

				for each in decrypted_numeric:
								decrypted += number_to_character[each]

				return decrypted


if __name__ == "__main__":
		__SCREAMING_SNAKE_CASE	:							Tuple           =  '''DEFEND THE EAST WALL OF THE CASTLE.'''
		__SCREAMING_SNAKE_CASE	:							Optional[Any]           =  encrypt_message(msg, '''EPSDUCVWYM.ZLKXNBTFGORIJHAQ''')
		__SCREAMING_SNAKE_CASE	:							Union[str, Any]           =  decrypt_message(encrypted, '''EPSDUCVWYM.ZLKXNBTFGORIJHAQ''')
		print(F'Encrypted: {encrypted}\nDecrypted: {decrypted}')





from math import floor, sqrt

def 		snake_case_   (				lowercase__     :    int     ):






				'''simple docstring'''






				_lowerCAmelCase  						=0.0
				_lowerCAmelCase  						=1.0
				_lowerCAmelCase  						=int(sqrt(lowercase__     )     )
				_lowerCAmelCase  						=root
				_lowerCAmelCase  						=0
				while integer_part != 2 * root:
								_lowerCAmelCase  						=denominator * integer_part - numerator
								_lowerCAmelCase  						=(n - numerator**2) / denominator
								_lowerCAmelCase  						=int((root + numerator) / denominator     )
								period += 1
				return period

def 		snake_case_   (				lowercase__     :    int = 1_00_00     ):






				'''simple docstring'''






				_lowerCAmelCase  						=0
				for i in range(2       ,     n + 1     ):
								_lowerCAmelCase  						=sqrt(lowercase__     )
								if sr - floor(lowercase__     ) != 0 and continuous_fraction_period(lowercase__     ) % 2 == 1:
												count_odd_periods += 1
				return count_odd_periods


if __name__ == "__main__":
		print(F'{solution(int(input().strip()))}')

